]> git.proxmox.com Git - rustc.git/blob - src/test/ui/generic-associated-types/missing_lifetime_args.rs
New upstream version 1.54.0+dfsg1
[rustc.git] / src / test / ui / generic-associated-types / missing_lifetime_args.rs
1 #![feature(generic_associated_types)]
2 //~^ WARNING the feature `generic_associated_types`
3
4 trait X {
5 type Y<'a, 'b>;
6 }
7
8 struct Foo<'a, 'b, 'c> {
9 a: &'a u32,
10 b: &'b str,
11 c: &'c str,
12 }
13
14 fn foo<'c, 'd>(_arg: Box<dyn X<Y = (&'c u32, &'d u32)>>) {}
15 //~^ ERROR missing generics for associated type
16
17 fn bar<'a, 'b, 'c>(_arg: Foo<'a, 'b>) {}
18 //~^ ERROR this struct takes 3 lifetime arguments but 2 lifetime
19
20 fn f<'a>(_arg: Foo<'a>) {}
21 //~^ ERROR this struct takes 3 lifetime arguments but 1 lifetime
22
23 fn main() {}