|
| 1 | +error[E0277]: the trait bound `for<'a> F: Output<'a>` is not satisfied |
| 2 | + --> $DIR/filter-relevant-fn-bounds.rs:8:5 |
| 3 | + | |
| 4 | +LL | / fn do_something_wrapper<O, F>(self, _: F) |
| 5 | +LL | | |
| 6 | +LL | | |
| 7 | +LL | | where |
| 8 | +LL | | F: for<'a> FnOnce(<F as Output<'a>>::Type), |
| 9 | + | |___________________________________________________^ the trait `for<'a> Output<'a>` is not implemented for `F` |
| 10 | + | |
| 11 | +help: consider further restricting this bound |
| 12 | + | |
| 13 | +LL | F: for<'a> FnOnce(<F as Output<'a>>::Type) + for<'a> Output<'a>, |
| 14 | + | ++++++++++++++++++++ |
| 15 | + |
| 16 | +error[E0277]: the trait bound `for<'a> F: Output<'a>` is not satisfied |
| 17 | + --> $DIR/filter-relevant-fn-bounds.rs:8:8 |
| 18 | + | |
| 19 | +LL | fn do_something_wrapper<O, F>(self, _: F) |
| 20 | + | ^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> Output<'a>` is not implemented for `F` |
| 21 | + | |
| 22 | +help: consider further restricting this bound |
| 23 | + | |
| 24 | +LL | F: for<'a> FnOnce(<F as Output<'a>>::Type) + for<'a> Output<'a>, |
| 25 | + | ++++++++++++++++++++ |
| 26 | + |
| 27 | +error[E0277]: the trait bound `F: Output<'_>` is not satisfied |
| 28 | + --> $DIR/filter-relevant-fn-bounds.rs:12:12 |
| 29 | + | |
| 30 | +LL | F: for<'a> FnOnce(<F as Output<'a>>::Type), |
| 31 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Output<'_>` is not implemented for `F` |
| 32 | + | |
| 33 | +help: consider further restricting this bound |
| 34 | + | |
| 35 | +LL | F: for<'a> FnOnce(<F as Output<'a>>::Type) + Output<'_>, |
| 36 | + | ++++++++++++ |
| 37 | + |
| 38 | +error[E0277]: the trait bound `F: Output<'_>` is not satisfied |
| 39 | + --> $DIR/filter-relevant-fn-bounds.rs:12:20 |
| 40 | + | |
| 41 | +LL | F: for<'a> FnOnce(<F as Output<'a>>::Type), |
| 42 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Output<'_>` is not implemented for `F` |
| 43 | + | |
| 44 | +help: consider further restricting this bound |
| 45 | + | |
| 46 | +LL | F: for<'a> FnOnce(<F as Output<'a>>::Type) + Output<'_>, |
| 47 | + | ++++++++++++ |
| 48 | + |
| 49 | +error[E0277]: expected a `FnOnce(<{closure@$DIR/filter-relevant-fn-bounds.rs:21:34: 21:41} as Output<'a>>::Type)` closure, found `{closure@$DIR/filter-relevant-fn-bounds.rs:21:34: 21:41}` |
| 50 | + --> $DIR/filter-relevant-fn-bounds.rs:21:34 |
| 51 | + | |
| 52 | +LL | wrapper.do_something_wrapper(|value| ()); |
| 53 | + | -------------------- ^^^^^^^^^^ expected an `FnOnce(<{closure@$DIR/filter-relevant-fn-bounds.rs:21:34: 21:41} as Output<'a>>::Type)` closure, found `{closure@$DIR/filter-relevant-fn-bounds.rs:21:34: 21:41}` |
| 54 | + | | |
| 55 | + | required by a bound introduced by this call |
| 56 | + | |
| 57 | + = help: the trait `for<'a> Output<'a>` is not implemented for closure `{closure@$DIR/filter-relevant-fn-bounds.rs:21:34: 21:41}` |
| 58 | +help: this trait has no implementations, consider adding one |
| 59 | + --> $DIR/filter-relevant-fn-bounds.rs:1:1 |
| 60 | + | |
| 61 | +LL | trait Output<'a> { |
| 62 | + | ^^^^^^^^^^^^^^^^ |
| 63 | +note: required by a bound in `Wrapper::do_something_wrapper` |
| 64 | + --> $DIR/filter-relevant-fn-bounds.rs:12:12 |
| 65 | + | |
| 66 | +LL | fn do_something_wrapper<O, F>(self, _: F) |
| 67 | + | -------------------- required by a bound in this associated function |
| 68 | +... |
| 69 | +LL | F: for<'a> FnOnce(<F as Output<'a>>::Type), |
| 70 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Wrapper::do_something_wrapper` |
| 71 | + |
| 72 | +error: aborting due to 5 previous errors |
| 73 | + |
| 74 | +For more information about this error, try `rustc --explain E0277`. |
0 commit comments