]> git.proxmox.com Git - rustc.git/blame - src/test/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / suggestions / fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr
CommitLineData
3c0e092e 1error[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 4LL | 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
9note: required by a bound in `bar`
10 --> $DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:14:16
11 |
12LL | fn bar(f: impl T<O=()>) {}
13 | ^^^^^^^ required by this bound in `bar`
2b03887a 14help: use parentheses to call this function
ba9703b0
XL
15 |
16LL | bar(foo());
94222f64 17 | ++
e1599b0c 18
064997fb 19error[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 22LL | 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
27note: required by a bound in `bar`
28 --> $DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:14:16
29 |
30LL | fn bar(f: impl T<O=()>) {}
31 | ^^^^^^^ required by this bound in `bar`
2b03887a 32help: use parentheses to call this closure
ba9703b0
XL
33 |
34LL | bar(closure());
94222f64 35 | ++
60c5eb7d
XL
36
37error: aborting due to 2 previous errors
e1599b0c
XL
38
39For more information about this error, try `rustc --explain E0277`.