]> git.lizzy.rs Git - rust.git/blob - tests/ui/type-alias-impl-trait/wf_check_closures.rs
Rollup merge of #106323 - starkat99:stabilize-f16c_target_feature, r=petrochenkov
[rust.git] / tests / ui / type-alias-impl-trait / wf_check_closures.rs
1 #![feature(type_alias_impl_trait)]
2
3 trait Bar {
4     fn bar(&self);
5 }
6
7 type FooFn<B> = impl FnOnce();
8
9 fn foo<B: Bar>(bar: B) -> FooFn<B> {
10     move || { bar.bar() }
11     //~^ ERROR the trait bound `B: Bar` is not satisfied
12 }
13
14 fn main() {
15     let boom: FooFn<u32> = unsafe { core::mem::zeroed() };
16     boom();
17 }