]> git.lizzy.rs Git - rust.git/blob - tests/ui/type-alias-impl-trait/wf_check_closures.stderr
Rollup merge of #104965 - zacklukem:p-option-as_ref-docs, r=scottmcm
[rust.git] / tests / ui / type-alias-impl-trait / wf_check_closures.stderr
1 error[E0277]: the trait bound `B: Bar` is not satisfied
2   --> $DIR/wf_check_closures.rs:10:5
3    |
4 LL |     move || { bar.bar() }
5    |     ^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` is not implemented for `B`
6    |
7 note: required by a bound in `foo`
8   --> $DIR/wf_check_closures.rs:9:11
9    |
10 LL | fn foo<B: Bar>(bar: B) -> FooFn<B> {
11    |           ^^^ required by this bound in `foo`
12 help: consider restricting type parameter `B`
13    |
14 LL | type FooFn<B: Bar> = impl FnOnce();
15    |             +++++
16
17 error: aborting due to previous error
18
19 For more information about this error, try `rustc --explain E0277`.