]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/call-on-unimplemented-with-autoderef.stderr
Rollup merge of #107127 - uweigand:s390x-sanitizer, r=Mark-Simulacrum
[rust.git] / tests / ui / suggestions / call-on-unimplemented-with-autoderef.stderr
1 error[E0277]: the trait bound `&Box<dyn Fn() -> i32>: Foo` is not satisfied
2   --> $DIR/call-on-unimplemented-with-autoderef.rs:8:15
3    |
4 LL |     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    |
9 note: required by a bound in `needs_foo`
10   --> $DIR/call-on-unimplemented-with-autoderef.rs:5:22
11    |
12 LL | fn needs_foo(_: impl Foo) {}
13    |                      ^^^ required by this bound in `needs_foo`
14 help: use parentheses to call this trait object
15    |
16 LL |     needs_foo(x());
17    |                ++
18
19 error: aborting due to previous error
20
21 For more information about this error, try `rustc --explain E0277`.