1 // Regression test for #90400,
2 // taken from https://github.com/rust-lang/rust/issues/90400#issuecomment-954927836
4 #![feature(type_alias_impl_trait)]
11 type FooFn<B>: FnOnce();
13 fn foo<B: Bar>(&self, bar: B) -> Self::FooFn<B>;
19 type FooFn<B> = impl FnOnce();
21 fn foo<B: Bar>(&self, bar: B) -> Self::FooFn<B> {
22 move || bar.bar() //~ ERROR: the trait bound `B: Bar` is not satisfied
27 let boom: <MyFoo as Foo>::FooFn<u32> = unsafe { core::mem::zeroed() };