]> git.proxmox.com Git - rustc.git/blob - src/test/ui/generic-associated-types/missing_lifetime_args.stderr
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / test / ui / generic-associated-types / missing_lifetime_args.stderr
1 error[E0107]: missing generics for associated type `X::Y`
2 --> $DIR/missing_lifetime_args.rs:13:32
3 |
4 LL | fn foo<'c, 'd>(_arg: Box<dyn X<Y = (&'c u32, &'d u32)>>) {}
5 | ^ expected 2 lifetime arguments
6 |
7 note: associated type defined here, with 2 lifetime parameters: `'a`, `'b`
8 --> $DIR/missing_lifetime_args.rs:4:10
9 |
10 LL | type Y<'a, 'b>;
11 | ^ -- --
12 help: add missing lifetime arguments
13 |
14 LL | fn foo<'c, 'd>(_arg: Box<dyn X<Y<'c, 'd> = (&'c u32, &'d u32)>>) {}
15 | ~~~~~~~~~
16
17 error[E0107]: this struct takes 3 lifetime arguments but 2 lifetime arguments were supplied
18 --> $DIR/missing_lifetime_args.rs:16:26
19 |
20 LL | fn bar<'a, 'b, 'c>(_arg: Foo<'a, 'b>) {}
21 | ^^^ -- -- supplied 2 lifetime arguments
22 | |
23 | expected 3 lifetime arguments
24 |
25 note: struct defined here, with 3 lifetime parameters: `'a`, `'b`, `'c`
26 --> $DIR/missing_lifetime_args.rs:7:8
27 |
28 LL | struct Foo<'a, 'b, 'c> {
29 | ^^^ -- -- --
30 help: add missing lifetime argument
31 |
32 LL | fn bar<'a, 'b, 'c>(_arg: Foo<'a, 'b, 'a>) {}
33 | ++++
34
35 error[E0107]: this struct takes 3 lifetime arguments but 1 lifetime argument was supplied
36 --> $DIR/missing_lifetime_args.rs:19:16
37 |
38 LL | fn f<'a>(_arg: Foo<'a>) {}
39 | ^^^ -- supplied 1 lifetime argument
40 | |
41 | expected 3 lifetime arguments
42 |
43 note: struct defined here, with 3 lifetime parameters: `'a`, `'b`, `'c`
44 --> $DIR/missing_lifetime_args.rs:7:8
45 |
46 LL | struct Foo<'a, 'b, 'c> {
47 | ^^^ -- -- --
48 help: add missing lifetime arguments
49 |
50 LL | fn f<'a>(_arg: Foo<'a, 'b, 'c>) {}
51 | ++++++++
52
53 error: aborting due to 3 previous errors
54
55 For more information about this error, try `rustc --explain E0107`.