@@ -10,18 +10,53 @@ error[E0107]: wrong number of lifetime arguments: expected 2, found 3
1010LL | S::<'static, 'static, 'static>(&0, &0);
1111 | ^^^^^^^ unexpected lifetime argument
1212
13+ warning: type parameter on variant
14+ --> $DIR/constructor-lifetime-args.rs:22:9
15+ |
16+ LL | E::V::<'static>(&0);
17+ | ^^^^^^^^^^^
18+ |
19+ = note: `#[warn(type_param_on_variant_ctor)]` on by default
20+ help: set the type parameter on the enum
21+ |
22+ LL | E::<'static>::V(&0);
23+ | ^^^^^^^^^^^ --
24+
1325error[E0107]: wrong number of lifetime arguments: expected 2, found 1
1426 --> $DIR/constructor-lifetime-args.rs:22:5
1527 |
1628LL | E::V::<'static>(&0);
1729 | ^^^^^^^^^^^^^^^ expected 2 lifetime arguments
1830
31+ warning: type parameter on variant
32+ --> $DIR/constructor-lifetime-args.rs:25:9
33+ |
34+ LL | E::V::<'static, 'static, 'static>(&0);
35+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36+ |
37+ help: set the type parameter on the enum
38+ |
39+ LL | E::<'static, 'static, 'static>::V(&0);
40+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ --
41+
1942error[E0107]: wrong number of lifetime arguments: expected 2, found 3
20- --> $DIR/constructor-lifetime-args.rs:24 :30
43+ --> $DIR/constructor-lifetime-args.rs:25 :30
2144 |
2245LL | E::V::<'static, 'static, 'static>(&0);
2346 | ^^^^^^^ unexpected lifetime argument
2447
25- error: aborting due to 4 previous errors
48+ error[E0107]: wrong number of lifetime arguments: expected 2, found 1
49+ --> $DIR/constructor-lifetime-args.rs:28:5
50+ |
51+ LL | E::<'static>::V(&0);
52+ | ^^^^^^^^^^^^^^^ expected 2 lifetime arguments
53+
54+ error[E0107]: wrong number of lifetime arguments: expected 2, found 3
55+ --> $DIR/constructor-lifetime-args.rs:30:27
56+ |
57+ LL | E::<'static, 'static, 'static>::V(&0);
58+ | ^^^^^^^ unexpected lifetime argument
59+
60+ error: aborting due to 6 previous errors
2661
2762For more information about this error, try `rustc --explain E0107`.
0 commit comments