]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/E0081.stderr
Rollup merge of #94855 - m-ou-se:advance-slice-panic-docs, r=kennytm
[rust.git] / src / test / ui / error-codes / E0081.stderr
1 error[E0081]: discriminant value `3` assigned more than once
2   --> $DIR/E0081.rs:1:1
3    |
4 LL | / enum Enum {
5 LL | |
6 LL | |     P = 3,
7    | |         - first assignment of `3`
8 LL | |
9 LL | |     X = 3,
10    | |         - second assignment of `3`
11 LL | |
12 LL | |     Y = 5
13 LL | | }
14    | |_^
15
16 error[E0081]: discriminant value `1` assigned more than once
17   --> $DIR/E0081.rs:11:1
18    |
19 LL | / enum EnumOverflowRepr {
20 LL | |
21 LL | |     P = 257,
22    | |         --- first assignment of `1` (overflowed from `257`)
23 LL | |
24 LL | |     X = 513,
25    | |         --- second assignment of `1` (overflowed from `513`)
26 LL | |
27 LL | | }
28    | |_^
29
30 error[E0081]: discriminant value `-1` assigned more than once
31   --> $DIR/E0081.rs:20:1
32    |
33 LL | / enum NegDisEnum {
34 LL | |
35 LL | |     First = -1,
36    | |             -- first assignment of `-1`
37 LL | |
38 LL | |     Second = -2,
39    | |     ----------- assigned discriminant for `Last` was incremented from this discriminant
40 LL | |
41 LL | |     Last,
42    | |     ---- second assignment of `-1`
43 LL | |
44 LL | | }
45    | |_^
46
47 error: aborting due to 3 previous errors
48
49 For more information about this error, try `rustc --explain E0081`.