]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr
Rollup merge of #106919 - compiler-errors:underscore-typo-in-field-pat, r=jackh726
[rust.git] / tests / ui / suggestions / fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr
1 error[E0277]: the trait bound `fn() -> impl T<O = ()> {foo}: T` is not satisfied
2   --> $DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:17:9
3    |
4 LL |     bar(foo);
5    |     --- ^^^ the trait `T` is not implemented for fn item `fn() -> impl T<O = ()> {foo}`
6    |     |
7    |     required by a bound introduced by this call
8    |
9 note: required by a bound in `bar`
10   --> $DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:14:16
11    |
12 LL | fn bar(f: impl T<O=()>) {}
13    |                ^^^^^^^ required by this bound in `bar`
14 help: use parentheses to call this function
15    |
16 LL |     bar(foo());
17    |            ++
18
19 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
20   --> $DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:19:9
21    |
22 LL |     bar(closure);
23    |     --- ^^^^^^^ 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]`
24    |     |
25    |     required by a bound introduced by this call
26    |
27 note: required by a bound in `bar`
28   --> $DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:14:16
29    |
30 LL | fn bar(f: impl T<O=()>) {}
31    |                ^^^^^^^ required by this bound in `bar`
32 help: use parentheses to call this closure
33    |
34 LL |     bar(closure());
35    |                ++
36
37 error: aborting due to 2 previous errors
38
39 For more information about this error, try `rustc --explain E0277`.