]> git.proxmox.com Git - rustc.git/blob - src/test/ui/generic-associated-types/missing_lifetime_args.rs
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / generic-associated-types / missing_lifetime_args.rs
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
13 fn foo<'c, 'd>(_arg: Box<dyn X<Y = (&'c u32, &'d u32)>>) {}
14 //~^ ERROR missing generics for associated type
15
16 fn bar<'a, 'b, 'c>(_arg: Foo<'a, 'b>) {}
17 //~^ ERROR this struct takes 3 lifetime arguments but 2 lifetime
18
19 fn f<'a>(_arg: Foo<'a>) {}
20 //~^ ERROR this struct takes 3 lifetime arguments but 1 lifetime
21
22 fn main() {}