]>
Commit | Line | Data |
---|---|---|
136023e0 XL |
1 | // check-pass |
2 | ||
136023e0 | 3 | #![feature(type_alias_impl_trait)] |
136023e0 XL |
4 | |
5 | pub trait AssociatedImpl { | |
6 | type ImplTrait; | |
7 | ||
8 | fn f() -> Self::ImplTrait; | |
9 | } | |
10 | ||
11 | struct S<T>(T); | |
12 | ||
13 | trait Associated { | |
14 | type A; | |
15 | } | |
16 | ||
17 | impl<'a, T: Associated<A = &'a ()>> AssociatedImpl for S<T> { | |
18 | type ImplTrait = impl core::fmt::Debug; | |
19 | ||
20 | fn f() -> Self::ImplTrait { | |
21 | () | |
22 | } | |
23 | } | |
24 | ||
25 | fn main() {} |