]> git.lizzy.rs Git - rust.git/blob - tests/ui/generic-associated-types/missing_lifetime_args.stderr
Auto merge of #106696 - kylematsuda:early-binder, r=lcnr
[rust.git] / tests / ui / generic-associated-types / missing_lifetime_args.stderr
1 error[E0107]: missing generics for associated type `X::Y`
2   --> $DIR/missing_lifetime_args.rs:11: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:2: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 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:14: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:5: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:17: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:5: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, 'a, 'a>) {}
51    |                      ++++++++
52
53 error: aborting due to 3 previous errors
54
55 For more information about this error, try `rustc --explain E0107`.