fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.1 KiB67 linesraw
1error[E0107]: struct takes 2 lifetime arguments but 1 lifetime argument was supplied
2  --> $DIR/constructor-lifetime-args.rs:17:5
3   |
4LL |     S::<'static>(&0, &0);
5   |     ^   ------- supplied 1 lifetime argument
6   |     |
7   |     expected 2 lifetime arguments
8   |
9note: struct defined here, with 2 lifetime parameters: `'a`, `'b`
10  --> $DIR/constructor-lifetime-args.rs:9:8
11   |
12LL | struct S<'a, 'b>(&'a u8, &'b u8);
13   |        ^ --  --
14help: add missing lifetime argument
15   |
16LL |     S::<'static, 'static>(&0, &0);
17   |                +++++++++
18
19error[E0107]: struct takes 2 lifetime arguments but 3 lifetime arguments were supplied
20  --> $DIR/constructor-lifetime-args.rs:19:5
21   |
22LL |     S::<'static, 'static, 'static>(&0, &0);
23   |     ^                     ------- help: remove this lifetime argument
24   |     |
25   |     expected 2 lifetime arguments
26   |
27note: struct defined here, with 2 lifetime parameters: `'a`, `'b`
28  --> $DIR/constructor-lifetime-args.rs:9:8
29   |
30LL | struct S<'a, 'b>(&'a u8, &'b u8);
31   |        ^ --  --
32
33error[E0107]: enum takes 2 lifetime arguments but 1 lifetime argument was supplied
34  --> $DIR/constructor-lifetime-args.rs:22:8
35   |
36LL |     E::V::<'static>(&0);
37   |        ^   ------- supplied 1 lifetime argument
38   |        |
39   |        expected 2 lifetime arguments
40   |
41note: enum defined here, with 2 lifetime parameters: `'a`, `'b`
42  --> $DIR/constructor-lifetime-args.rs:10:6
43   |
44LL | enum E<'a, 'b> {
45   |      ^ --  --
46help: add missing lifetime argument
47   |
48LL |     E::V::<'static, 'static>(&0);
49   |                   +++++++++
50
51error[E0107]: enum takes 2 lifetime arguments but 3 lifetime arguments were supplied
52  --> $DIR/constructor-lifetime-args.rs:24:8
53   |
54LL |     E::V::<'static, 'static, 'static>(&0);
55   |        ^                     ------- help: remove this lifetime argument
56   |        |
57   |        expected 2 lifetime arguments
58   |
59note: enum defined here, with 2 lifetime parameters: `'a`, `'b`
60  --> $DIR/constructor-lifetime-args.rs:10:6
61   |
62LL | enum E<'a, 'b> {
63   |      ^ --  --
64
65error: aborting due to 4 previous errors
66
67For more information about this error, try `rustc --explain E0107`.