1 // Regression test for issue #57611
2 // Ensures that we don't ICE
3 // FIXME: This should compile, but it currently doesn't
5 #![feature(trait_alias)]
6 #![feature(type_alias_impl_trait)]
9 type Bar: Baz<Self, Self>;
11 fn bar(&self) -> Self::Bar;
17 type Bar = impl Baz<Self, Self>;
19 fn bar(&self) -> Self::Bar {
21 //~^ ERROR implementation of `FnOnce` is not general enough
25 trait Baz<A: ?Sized, B: ?Sized> = Fn(&A) -> &B;