1- error: `repr(C)` enum discriminant does not fit into C `int`
2- --> $DIR/repr-c-big-discriminant1.rs:16 :5
1+ error: `repr(C)` enum discriminant does not fit into C `int` nor into C `unsigned int`
2+ --> $DIR/repr-c-big-discriminant1.rs:18 :5
33 |
44LL | A = 9223372036854775807, // i64::MAX
55 | ^
@@ -9,13 +9,13 @@ LL | A = 9223372036854775807, // i64::MAX
99 = note: `repr(C)` enums with big discriminants are non-portable, and their size in Rust might not match their size in C
1010 = help: use `repr($int_ty)` instead to explicitly set the size of this enum
1111note: the lint level is defined here
12- --> $DIR/repr-c-big-discriminant1.rs:6 :9
12+ --> $DIR/repr-c-big-discriminant1.rs:8 :9
1313 |
1414LL | #![deny(repr_c_enums_larger_than_int)]
1515 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1616
17- error: `repr(C)` enum discriminant does not fit into C `int`
18- --> $DIR/repr-c-big-discriminant1.rs:24 :5
17+ error: `repr(C)` enum discriminant does not fit into C `int` nor into C `unsigned int`
18+ --> $DIR/repr-c-big-discriminant1.rs:26 :5
1919 |
2020LL | A = -2147483649, // i32::MIN-1
2121 | ^
@@ -25,8 +25,30 @@ LL | A = -2147483649, // i32::MIN-1
2525 = note: `repr(C)` enums with big discriminants are non-portable, and their size in Rust might not match their size in C
2626 = help: use `repr($int_ty)` instead to explicitly set the size of this enum
2727
28- error: `repr(C)` enum discriminant does not fit into C `int`
29- --> $DIR/repr-c-big-discriminant1.rs:34:5
28+ error: `repr(C)` enum discriminant does not fit into C `unsigned int`, and a previous discriminant does not fit into C `int`
29+ --> $DIR/repr-c-big-discriminant1.rs:36:5
30+ |
31+ LL | B = -1,
32+ | ^
33+ |
34+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
35+ = note: for more information, see issue #124403 <https://github.com/rust-lang/rust/issues/124403>
36+ = note: `repr(C)` enums with big discriminants are non-portable, and their size in Rust might not match their size in C
37+ = help: use `repr($int_ty)` instead to explicitly set the size of this enum
38+
39+ error: `repr(C)` enum discriminant does not fit into C `int`, and a previous discriminant does not fit into C `unsigned int`
40+ --> $DIR/repr-c-big-discriminant1.rs:43:5
41+ |
42+ LL | A = 2147483648, // i32::MAX+1
43+ | ^
44+ |
45+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
46+ = note: for more information, see issue #124403 <https://github.com/rust-lang/rust/issues/124403>
47+ = note: `repr(C)` enums with big discriminants are non-portable, and their size in Rust might not match their size in C
48+ = help: use `repr($int_ty)` instead to explicitly set the size of this enum
49+
50+ error: `repr(C)` enum discriminant does not fit into C `int` nor into C `unsigned int`
51+ --> $DIR/repr-c-big-discriminant1.rs:53:5
3052 |
3153LL | A = I64_MAX as isize,
3254 | ^
@@ -36,5 +58,5 @@ LL | A = I64_MAX as isize,
3658 = note: `repr(C)` enums with big discriminants are non-portable, and their size in Rust might not match their size in C
3759 = help: use `repr($int_ty)` instead to explicitly set the size of this enum
3860
39- error: aborting due to 3 previous errors
61+ error: aborting due to 5 previous errors
4062
0 commit comments