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