]>
Commit | Line | Data |
---|---|---|
3c0e092e | 1 | error[E0277]: the trait bound `fn() -> impl T<O = ()> {foo}: T` is not satisfied |
e1599b0c XL |
2 | --> $DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:17:9 |
3 | | | |
e1599b0c | 4 | LL | bar(foo); |
f2b60f7d | 5 | | --- ^^^ the trait `T` is not implemented for fn item `fn() -> impl T<O = ()> {foo}` |
c295e0f8 XL |
6 | | | |
7 | | required by a bound introduced by this call | |
ba9703b0 | 8 | | |
94222f64 XL |
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` | |
2b03887a | 14 | help: use parentheses to call this function |
ba9703b0 XL |
15 | | |
16 | LL | bar(foo()); | |
94222f64 | 17 | | ++ |
e1599b0c | 18 | |
064997fb | 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 |
60c5eb7d XL |
20 | --> $DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:19:9 |
21 | | | |
60c5eb7d | 22 | LL | bar(closure); |
f2b60f7d | 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]` |
c295e0f8 XL |
24 | | | |
25 | | required by a bound introduced by this call | |
ba9703b0 | 26 | | |
94222f64 XL |
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` | |
2b03887a | 32 | help: use parentheses to call this closure |
ba9703b0 XL |
33 | | |
34 | LL | bar(closure()); | |
94222f64 | 35 | | ++ |
60c5eb7d XL |
36 | |
37 | error: aborting due to 2 previous errors | |
e1599b0c XL |
38 | |
39 | For more information about this error, try `rustc --explain E0277`. |