1 error[E0277]: the trait bound `B: Bar` is not satisfied
2 --> $DIR/wf_check_closures.rs:10:5
4 LL | move || { bar.bar() }
5 | ^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` is not implemented for `B`
7 note: required by a bound in `foo`
8 --> $DIR/wf_check_closures.rs:9:11
10 LL | fn foo<B: Bar>(bar: B) -> FooFn<B> {
11 | ^^^ required by this bound in `foo`
12 help: consider restricting type parameter `B`
14 LL | type FooFn<B: Bar> = impl FnOnce();
17 error: aborting due to previous error
19 For more information about this error, try `rustc --explain E0277`.