1 // Regression test for #90400,
2 // taken from https://github.com/rust-lang/rust/issues/90400#issuecomment-954927836
4 #![feature(type_alias_impl_trait)]
17 fn foo<B: Bar>(&self, bar: B) -> Self::FooFn<B>;
22 type FooFn<B> = impl Baz;
24 fn foo<B: Bar>(&self, bar: B) -> Self::FooFn<B> {
25 MyBaz(bar) //~ ERROR: the trait bound `B: Bar` is not satisfied
29 struct MyBaz<B: Bar>(B);
30 impl<B: Bar> Baz for MyBaz<B> {
35 let boom: <MyFoo as Foo>::FooFn<u32> = unsafe { core::mem::zeroed() };