fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
545 B15 linesraw
1error[E0277]: the trait bound `fn() -> impl T {foo}: T` is not satisfied
2  --> $DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:17:9
3   |
4LL | fn bar(f: impl T<O=()>) {}
5   |    ---         ------- required by this bound in `bar`
6...
7LL |     bar(foo);
8   |         ^^^
9   |         |
10   |         the trait `T` is not implemented for `fn() -> impl T {foo}`
11   |         help: use parentheses to call the function: `foo()`
12
13error: aborting due to previous error
14
15For more information about this error, try `rustc --explain E0277`.