1 #![feature(generic_associated_types)]
2
3 trait X {
4 type Y<'a, 'b>;
5 }
6
7 struct Foo<'a, 'b, 'c> {
8 a: &'a u32,
9 b: &'b str,
10 c: &'c str,
11 }
12
foo<'c, 'd>(_arg: Box<dyn X<Y = (&'c u32, &'d u32)>>)13 fn foo<'c, 'd>(_arg: Box<dyn X<Y = (&'c u32, &'d u32)>>) {}
14 //~^ ERROR missing generics for associated type
15
bar<'a, 'b, 'c>(_arg: Foo<'a, 'b>)16 fn bar<'a, 'b, 'c>(_arg: Foo<'a, 'b>) {}
17 //~^ ERROR this struct takes 3 lifetime arguments but 2 lifetime
18
f<'a>(_arg: Foo<'a>)19 fn f<'a>(_arg: Foo<'a>) {}
20 //~^ ERROR this struct takes 3 lifetime arguments but 1 lifetime
21
main()22 fn main() {}
23