]> git.lizzy.rs Git - rust.git/blob - tests/ui/type-alias-impl-trait/wf-check-fn-def.stderr
Rollup merge of #106716 - c410-f3r:rfc-2397-1, r=davidtwco
[rust.git] / tests / ui / type-alias-impl-trait / wf-check-fn-def.stderr
1 error[E0277]: the trait bound `B: Bar` is not satisfied
2   --> $DIR/wf-check-fn-def.rs:11:5
3    |
4 LL |     mop // NOTE: no function pointer, but function zst item
5    |     ^^^ the trait `Bar` is not implemented for `B`
6    |
7 note: required by a bound in `mop`
8   --> $DIR/wf-check-fn-def.rs:10:15
9    |
10 LL |     fn mop<B: Bar>(bar: B) { bar.bar() }
11    |               ^^^ required by this bound in `mop`
12 help: consider restricting type parameter `B`
13    |
14 LL | type FooFn<B: Bar> = impl FnOnce(B);
15    |             +++++
16
17 error: aborting due to previous error
18
19 For more information about this error, try `rustc --explain E0277`.