2022-05-27 13:42:15 +00:00
|
|
|
error[E0081]: discriminant value `3` assigned more than once
|
|
|
|
--> $DIR/E0081.rs:1:1
|
2018-02-08 03:35:35 +00:00
|
|
|
|
|
2022-07-08 01:50:10 +00:00
|
|
|
LL | enum Enum {
|
|
|
|
| ^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | P = 3,
|
2022-08-07 15:24:25 +00:00
|
|
|
| - `3` assigned here
|
2022-07-08 01:50:10 +00:00
|
|
|
LL |
|
|
|
|
LL | X = 3,
|
2022-08-07 15:24:25 +00:00
|
|
|
| - `3` assigned here
|
2018-02-08 03:35:35 +00:00
|
|
|
|
2022-05-27 13:42:15 +00:00
|
|
|
error[E0081]: discriminant value `1` assigned more than once
|
|
|
|
--> $DIR/E0081.rs:11:1
|
2021-07-15 19:25:11 +00:00
|
|
|
|
|
2022-07-08 01:50:10 +00:00
|
|
|
LL | enum EnumOverflowRepr {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | P = 257,
|
2022-08-07 15:24:25 +00:00
|
|
|
| --- `1` (overflowed from `257`) assigned here
|
2022-07-08 01:50:10 +00:00
|
|
|
LL |
|
|
|
|
LL | X = 513,
|
2022-08-07 15:24:25 +00:00
|
|
|
| --- `1` (overflowed from `513`) assigned here
|
2021-07-15 19:25:11 +00:00
|
|
|
|
2022-05-27 13:42:15 +00:00
|
|
|
error[E0081]: discriminant value `-1` assigned more than once
|
|
|
|
--> $DIR/E0081.rs:20:1
|
|
|
|
|
|
2022-07-08 01:50:10 +00:00
|
|
|
LL | enum NegDisEnum {
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | First = -1,
|
2022-08-07 15:24:25 +00:00
|
|
|
| -- `-1` assigned here
|
2022-07-08 01:50:10 +00:00
|
|
|
LL |
|
|
|
|
LL | Second = -2,
|
2022-10-30 18:31:03 +00:00
|
|
|
| ------ discriminant for `Last` incremented from this startpoint (`Second` + 1 variant later => `Last` = -1)
|
2022-07-08 01:50:10 +00:00
|
|
|
LL |
|
|
|
|
LL | Last,
|
2022-08-07 15:24:25 +00:00
|
|
|
| ---- `-1` assigned here
|
2022-05-27 13:42:15 +00:00
|
|
|
|
2022-08-07 15:24:25 +00:00
|
|
|
error[E0081]: discriminant value `0` assigned more than once
|
2022-08-08 19:34:55 +00:00
|
|
|
--> $DIR/E0081.rs:30:1
|
2022-08-07 15:24:25 +00:00
|
|
|
|
|
|
|
|
LL | enum MultipleDuplicates {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
2022-08-08 19:34:55 +00:00
|
|
|
...
|
2022-08-07 15:24:25 +00:00
|
|
|
LL | V0,
|
|
|
|
| -- `0` assigned here
|
|
|
|
LL |
|
|
|
|
LL | V1 = 0,
|
|
|
|
| - `0` assigned here
|
|
|
|
...
|
|
|
|
LL | V4 = 0,
|
|
|
|
| - `0` assigned here
|
|
|
|
LL |
|
|
|
|
LL | V5 = -2,
|
2022-10-30 18:31:03 +00:00
|
|
|
| -- discriminant for `V7` incremented from this startpoint (`V5` + 2 variants later => `V7` = 0)
|
2022-08-07 15:24:25 +00:00
|
|
|
...
|
|
|
|
LL | V7,
|
|
|
|
| -- `0` assigned here
|
|
|
|
|
2022-08-08 19:34:55 +00:00
|
|
|
error[E0081]: discriminant value `-2` assigned more than once
|
|
|
|
--> $DIR/E0081.rs:30:1
|
|
|
|
|
|
|
|
|
LL | enum MultipleDuplicates {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
...
|
|
|
|
LL | V5 = -2,
|
|
|
|
| -- `-2` assigned here
|
|
|
|
...
|
|
|
|
LL | V8 = -3,
|
2022-10-30 18:31:03 +00:00
|
|
|
| -- discriminant for `V9` incremented from this startpoint (`V8` + 1 variant later => `V9` = -2)
|
2022-08-08 19:34:55 +00:00
|
|
|
LL |
|
|
|
|
LL | V9,
|
|
|
|
| -- `-2` assigned here
|
|
|
|
|
|
|
|
error: aborting due to 5 previous errors
|
2018-02-08 03:35:35 +00:00
|
|
|
|
2018-03-03 14:59:40 +00:00
|
|
|
For more information about this error, try `rustc --explain E0081`.
|