]>
Commit | Line | Data |
---|---|---|
04454e1e FG |
1 | #![feature(type_alias_impl_trait)] |
2 | ||
04454e1e FG |
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() } | |
923072b8 | 11 | //~^ ERROR the trait bound `B: Bar` is not satisfied |
04454e1e FG |
12 | } |
13 | ||
14 | fn main() { | |
15 | let boom: FooFn<u32> = unsafe { core::mem::zeroed() }; | |
16 | boom(); | |
17 | } |