blob: 0e00adf6ea64f6b53faf92aa80f98c4a5fa7d5d3 [file] [log] [blame]
error[E0277]: the trait bound `for<'a> F: Output<'a>` is not satisfied
--> $DIR/filter-relevant-fn-bounds.rs:8:5
|
LL | / fn do_something_wrapper<O, F>(self, _: F)
LL | |
LL | |
LL | | where
LL | | F: for<'a> FnOnce(<F as Output<'a>>::Type),
| |___________________________________________________^ the trait `for<'a> Output<'a>` is not implemented for `F`
|
help: consider further restricting type parameter `F` with trait `Output`
|
LL | F: for<'a> FnOnce(<F as Output<'a>>::Type) + for<'a> Output<'a>,
| ++++++++++++++++++++
error[E0277]: the trait bound `for<'a> F: Output<'a>` is not satisfied
--> $DIR/filter-relevant-fn-bounds.rs:8:8
|
LL | fn do_something_wrapper<O, F>(self, _: F)
| ^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> Output<'a>` is not implemented for `F`
|
help: consider further restricting type parameter `F` with trait `Output`
|
LL | F: for<'a> FnOnce(<F as Output<'a>>::Type) + for<'a> Output<'a>,
| ++++++++++++++++++++
error[E0277]: the trait bound `F: Output<'_>` is not satisfied
--> $DIR/filter-relevant-fn-bounds.rs:12:12
|
LL | F: for<'a> FnOnce(<F as Output<'a>>::Type),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Output<'_>` is not implemented for `F`
|
help: consider further restricting type parameter `F` with trait `Output`
|
LL | F: for<'a> FnOnce(<F as Output<'a>>::Type) + Output<'_>,
| ++++++++++++
error[E0277]: the trait bound `F: Output<'_>` is not satisfied
--> $DIR/filter-relevant-fn-bounds.rs:12:20
|
LL | F: for<'a> FnOnce(<F as Output<'a>>::Type),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Output<'_>` is not implemented for `F`
|
help: consider further restricting type parameter `F` with trait `Output`
|
LL | F: for<'a> FnOnce(<F as Output<'a>>::Type) + Output<'_>,
| ++++++++++++
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}`
--> $DIR/filter-relevant-fn-bounds.rs:21:34
|
LL | wrapper.do_something_wrapper(|value| ());
| -------------------- ^^^^^^^^^^ 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}`
| |
| required by a bound introduced by this call
|
= help: the trait `for<'a> Output<'a>` is not implemented for closure `{closure@$DIR/filter-relevant-fn-bounds.rs:21:34: 21:41}`
help: this trait has no implementations, consider adding one
--> $DIR/filter-relevant-fn-bounds.rs:1:1
|
LL | trait Output<'a> {
| ^^^^^^^^^^^^^^^^
note: required by a bound in `Wrapper::do_something_wrapper`
--> $DIR/filter-relevant-fn-bounds.rs:12:12
|
LL | fn do_something_wrapper<O, F>(self, _: F)
| -------------------- required by a bound in this associated function
...
LL | F: for<'a> FnOnce(<F as Output<'a>>::Type),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Wrapper::do_something_wrapper`
error: aborting due to 5 previous errors
For more information about this error, try `rustc --explain E0277`.