2019-08-24 14:45:03 -07:00
|
|
|
error[E0277]: the trait bound `fn() -> impl T {foo}: T` is not satisfied
|
2019-09-15 21:58:20 -07:00
|
|
|
--> $DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:17:9
|
2019-08-24 14:45:03 -07:00
|
|
|
|
|
|
|
|
LL | fn bar(f: impl T<O=()>) {}
|
|
|
|
| ----------------------- required by `bar`
|
|
|
|
...
|
|
|
|
LL | bar(foo);
|
2019-09-16 15:54:31 -07:00
|
|
|
| ^^^
|
|
|
|
| |
|
|
|
|
| the trait `T` is not implemented for `fn() -> impl T {foo}`
|
|
|
|
| help: use parentheses to call the function: `foo()`
|
2019-08-24 14:45:03 -07:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|