rust/src/test/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr

16 lines
532 B
Plaintext
Raw Normal View History

error[E0277]: the trait bound `fn() -> impl T {foo}: T` is not satisfied
--> $DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:17:9
|
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()`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0277`.