2021-11-20 04:51:44 +00:00
|
|
|
error[E0277]: the trait bound `fn() -> impl T<O = ()> {foo}: T` is not satisfied
|
2019-09-16 04:58:20 +00:00
|
|
|
--> $DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:17:9
|
2019-08-24 21:45:03 +00:00
|
|
|
|
|
|
|
|
LL | bar(foo);
|
2022-08-29 13:53:36 +00:00
|
|
|
| --- ^^^ the trait `T` is not implemented for fn item `fn() -> impl T<O = ()> {foo}`
|
2021-09-07 11:30:53 +00:00
|
|
|
| |
|
|
|
|
| required by a bound introduced by this call
|
2020-03-12 03:38:21 +00:00
|
|
|
|
|
2021-07-31 16:26:55 +00:00
|
|
|
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`
|
2022-10-09 22:25:52 +00:00
|
|
|
help: use parentheses to call this function
|
2020-03-12 03:38:21 +00:00
|
|
|
|
|
|
|
|
LL | bar(foo());
|
2021-06-22 02:07:19 +00:00
|
|
|
| ++
|
2019-08-24 21:45:03 +00:00
|
|
|
|
2022-06-27 05:45:35 +00: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
|
2019-11-09 02:04:05 +00:00
|
|
|
--> $DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:19:9
|
|
|
|
|
|
|
|
|
LL | bar(closure);
|
2022-08-29 13:53:36 +00:00
|
|
|
| --- ^^^^^^^ 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]`
|
2021-09-07 11:30:53 +00:00
|
|
|
| |
|
|
|
|
| required by a bound introduced by this call
|
2020-03-12 03:38:21 +00:00
|
|
|
|
|
2021-07-31 16:26:55 +00:00
|
|
|
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`
|
2022-10-09 22:25:52 +00:00
|
|
|
help: use parentheses to call this closure
|
2020-03-12 03:38:21 +00:00
|
|
|
|
|
|
|
|
LL | bar(closure());
|
2021-06-22 02:07:19 +00:00
|
|
|
| ++
|
2019-11-09 02:04:05 +00:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
2019-08-24 21:45:03 +00:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|