]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/call-on-unimplemented-fn-ptr.stderr
Rollup merge of #106625 - Swatinem:ref/cov6, r=nagisa
[rust.git] / tests / ui / suggestions / call-on-unimplemented-fn-ptr.stderr
1 error[E0277]: the trait bound `fn() -> Foo: Bar` is not satisfied
2   --> $DIR/call-on-unimplemented-fn-ptr.rs:10:15
3    |
4 LL |     needs_bar(f);
5    |     --------- ^ the trait `Bar` is not implemented for `fn() -> Foo`
6    |     |
7    |     required by a bound introduced by this call
8    |
9 note: required by a bound in `needs_bar`
10   --> $DIR/call-on-unimplemented-fn-ptr.rs:7:17
11    |
12 LL | fn needs_bar<T: Bar>(_: T) {}
13    |                 ^^^ required by this bound in `needs_bar`
14 help: use parentheses to call this function pointer
15    |
16 LL |     needs_bar(f());
17    |                ++
18
19 error: aborting due to previous error
20
21 For more information about this error, try `rustc --explain E0277`.