1 #![feature(generic_associated_types)] 2 #![feature(associated_type_defaults)] 3 4 trait Foo { 5 type A<'a>; 6 type B<'a, 'b>; 7 type C; 8 type D<T>; 9 type E<'a, T>; 10 // Test parameters in default values 11 type FOk<T> = Self::E<'static, T>; 12 type FErr1 = Self::E<'static, 'static>; 13 //~^ ERROR this associated type takes 1 lifetime argument but 2 lifetime arguments were supplied 14 //~| ERROR this associated type takes 1 15 type FErr2<T> = Self::E<'static, T, u32>; 16 //~^ ERROR this associated type takes 1 17 } 18 main()19fn main() {} 20