File: E0081.stderr

package info (click to toggle)
rustc 1.89.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 906,624 kB
  • sloc: xml: 158,148; python: 34,888; javascript: 19,595; sh: 19,221; ansic: 13,046; cpp: 7,144; asm: 4,376; makefile: 692; lisp: 174; sql: 15
file content (102 lines) | stat: -rw-r--r-- 2,611 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
error[E0081]: discriminant value `3` assigned more than once
  --> $DIR/E0081.rs:1:1
   |
LL | enum Enum {
   | ^^^^^^^^^
LL |
LL |     P = 3,
   |         - `3` assigned here
LL |
LL |     X = 3,
   |         - `3` assigned here

error[E0081]: discriminant value `1` assigned more than once
  --> $DIR/E0081.rs:11:1
   |
LL | enum EnumOverflowRepr {
   | ^^^^^^^^^^^^^^^^^^^^^
LL |
LL |     P = 257,
   |         --- `1` (overflowed from `257`) assigned here
LL |
LL |     X = 513,
   |         --- `1` (overflowed from `513`) assigned here

error[E0081]: discriminant value `-1` assigned more than once
  --> $DIR/E0081.rs:20:1
   |
LL | enum NegDisEnum {
   | ^^^^^^^^^^^^^^^
LL |
LL |     First = -1,
   |             -- `-1` assigned here
LL |
LL |     Second = -2,
   |     ------ discriminant for `Last` incremented from this startpoint (`Second` + 1 variant later => `Last` = -1)
LL |
LL |     Last,
   |     ---- `-1` assigned here

error[E0081]: discriminant value `0` assigned more than once
  --> $DIR/E0081.rs:30:1
   |
LL | enum MultipleDuplicates {
   | ^^^^^^^^^^^^^^^^^^^^^^^
...
LL |     V0,
   |     -- `0` assigned here
LL |
LL |     V1 = 0,
   |          - `0` assigned here
...
LL |     V4 = 0,
   |          - `0` assigned here
LL |
LL |     V5 = -2,
   |     -- discriminant for `V7` incremented from this startpoint (`V5` + 2 variants later => `V7` = 0)
...
LL |     V7,
   |     -- `0` assigned here

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,
   |     -- discriminant for `V9` incremented from this startpoint (`V8` + 1 variant later => `V9` = -2)
LL |
LL |     V9,
   |     -- `-2` assigned here

error[E0370]: enum discriminant overflowed
  --> $DIR/E0081.rs:87:5
   |
LL |     X256,
   |     ^^^^ overflowed on value after 255
   |
   = note: explicitly set `X256 = 0` if that is desired outcome

error[E0081]: discriminant value `0` assigned more than once
  --> $DIR/E0081.rs:57:1
   |
LL | enum TooManyVariants {
   | ^^^^^^^^^^^^^^^^^^^^
LL |
LL |     X000, X001, X002, X003, X004, X005, X006, X007, X008, X009,
   |     ----
   |     |
   |     `0` assigned here
   |     discriminant for `X256` incremented from this startpoint (`X000` + 256 variants later => `X256` = 0)
...
LL |     X256,
   |     ---- `0` assigned here

error: aborting due to 7 previous errors

Some errors have detailed explanations: E0081, E0370.
For more information about an error, try `rustc --explain E0081`.