fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
726 B21 linesraw
1error[E0277]: the trait bound `&Box<dyn Fn() -> i32>: Foo` is not satisfied
2  --> $DIR/call-on-unimplemented-with-autoderef.rs:8:15
3   |
4LL |     needs_foo(x);
5   |     --------- ^ the trait `Foo` is not implemented for `&Box<dyn Fn() -> i32>`
6   |     |
7   |     required by a bound introduced by this call
8   |
9note: required by a bound in `needs_foo`
10  --> $DIR/call-on-unimplemented-with-autoderef.rs:5:22
11   |
12LL | fn needs_foo(_: impl Foo) {}
13   |                      ^^^ required by this bound in `needs_foo`
14help: use parentheses to call this trait object
15   |
16LL |     needs_foo(x());
17   |                ++
18
19error: aborting due to previous error
20
21For more information about this error, try `rustc --explain E0277`.