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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
1.5 KiB
Plaintext
Raw Normal View History

2021-11-19 22:51:44 -06:00
error[E0277]: the trait bound `fn() -> impl T<O = ()> {foo}: T` is not satisfied
--> $DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:17:9
|
LL | bar(foo);
| --- ^^^ the trait `T` is not implemented for fn item `fn() -> impl T<O = ()> {foo}`
| |
| required by a bound introduced by this call
|
note: required by a bound in `bar`
--> $DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:14:16
|
LL | fn bar(f: impl T<O=()>) {}
| ^^^^^^^ required by this bound in `bar`
help: use parentheses to call this function
|
LL | bar(foo());
| ++
2022-06-27 00:45:35 -05:00
error[E0277]: the trait bound `[closure@$DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:18:19: 18:21]: T` is not satisfied
--> $DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:19:9
|
LL | bar(closure);
| --- ^^^^^^^ the trait `T` is not implemented for closure `[closure@$DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:18:19: 18:21]`
| |
| required by a bound introduced by this call
|
note: required by a bound in `bar`
--> $DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:14:16
|
LL | fn bar(f: impl T<O=()>) {}
| ^^^^^^^ required by this bound in `bar`
help: use parentheses to call this closure
|
LL | bar(closure());
| ++
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0277`.