]>
Commit | Line | Data |
---|---|---|
f035d41b XL |
1 | #![feature(generic_associated_types)] |
2 | ||
3 | trait ATy { | |
4 | type Item<'a>: 'a; | |
5 | } | |
6 | ||
7 | impl<'b> ATy for &'b () { | |
8 | type Item<'a> = &'b (); | |
29967ef6 | 9 | //~^ ERROR the type `&'b ()` does not fulfill the required lifetime |
f035d41b XL |
10 | } |
11 | ||
12 | trait StaticTy { | |
13 | type Item<'a>: 'static; | |
14 | } | |
15 | ||
16 | impl StaticTy for () { | |
17 | type Item<'a> = &'a (); | |
29967ef6 | 18 | //~^ ERROR the type `&'a ()` does not fulfill the required lifetime |
f035d41b XL |
19 | } |
20 | ||
21 | fn main() {} |