fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[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 | 4LL | 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 | 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` 14help: use parentheses to call this function 15 | 16LL | bar(foo()); 17 | ++ 18 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 20 --> $DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:19:9 21 | 22LL | 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 | 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` 32help: use parentheses to call this closure 33 | 34LL | bar(closure()); 35 | ++ 36 37error: aborting due to 2 previous errors 38 39For more information about this error, try `rustc --explain E0277`.