]>
Commit | Line | Data |
---|---|---|
dfeec247 XL |
1 | // Regression test for issue #57611 |
2 | // Ensures that we don't ICE | |
3 | // FIXME: This should compile, but it currently doesn't | |
064997fb | 4 | // known-bug: unknown |
04454e1e | 5 | |
dfeec247 | 6 | #![feature(trait_alias)] |
94222f64 | 7 | #![feature(type_alias_impl_trait)] |
dfeec247 XL |
8 | |
9 | trait Foo { | |
10 | type Bar: Baz<Self, Self>; | |
11 | ||
12 | fn bar(&self) -> Self::Bar; | |
13 | } | |
14 | ||
15 | struct X; | |
16 | ||
17 | impl Foo for X { | |
f035d41b | 18 | type Bar = impl Baz<Self, Self>; |
dfeec247 XL |
19 | |
20 | fn bar(&self) -> Self::Bar { | |
21 | |x| x | |
22 | } | |
23 | } | |
24 | ||
1b1a35ee | 25 | trait Baz<A: ?Sized, B: ?Sized> = Fn(&A) -> &B; |
dfeec247 XL |
26 | |
27 | fn main() {} |