@@ -60,3 +60,88 @@ LL | pub const E: u8 = [5u8][1];
6060
6161error: aborting due to 5 previous errors
6262
63+ Future incompatibility report: Future breakage diagnostic:
64+ error: any use of this value will cause an error
65+ --> $DIR/const-err-early.rs:3:19
66+ |
67+ LL | pub const A: i8 = -i8::MIN;
68+ | ------------------^^^^^^^^-
69+ | |
70+ | attempt to negate `i8::MIN`, which would overflow
71+ |
72+ note: the lint level is defined here
73+ --> $DIR/const-err-early.rs:1:9
74+ |
75+ LL | #![deny(const_err)]
76+ | ^^^^^^^^^
77+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
78+ = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
79+
80+ Future breakage diagnostic:
81+ error: any use of this value will cause an error
82+ --> $DIR/const-err-early.rs:5:19
83+ |
84+ LL | pub const B: u8 = 200u8 + 200u8;
85+ | ------------------^^^^^^^^^^^^^-
86+ | |
87+ | attempt to compute `200_u8 + 200_u8`, which would overflow
88+ |
89+ note: the lint level is defined here
90+ --> $DIR/const-err-early.rs:1:9
91+ |
92+ LL | #![deny(const_err)]
93+ | ^^^^^^^^^
94+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
95+ = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
96+
97+ Future breakage diagnostic:
98+ error: any use of this value will cause an error
99+ --> $DIR/const-err-early.rs:7:19
100+ |
101+ LL | pub const C: u8 = 200u8 * 4;
102+ | ------------------^^^^^^^^^-
103+ | |
104+ | attempt to compute `200_u8 * 4_u8`, which would overflow
105+ |
106+ note: the lint level is defined here
107+ --> $DIR/const-err-early.rs:1:9
108+ |
109+ LL | #![deny(const_err)]
110+ | ^^^^^^^^^
111+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
112+ = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
113+
114+ Future breakage diagnostic:
115+ error: any use of this value will cause an error
116+ --> $DIR/const-err-early.rs:9:19
117+ |
118+ LL | pub const D: u8 = 42u8 - (42u8 + 1);
119+ | ------------------^^^^^^^^^^^^^^^^^-
120+ | |
121+ | attempt to compute `42_u8 - 43_u8`, which would overflow
122+ |
123+ note: the lint level is defined here
124+ --> $DIR/const-err-early.rs:1:9
125+ |
126+ LL | #![deny(const_err)]
127+ | ^^^^^^^^^
128+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
129+ = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
130+
131+ Future breakage diagnostic:
132+ error: any use of this value will cause an error
133+ --> $DIR/const-err-early.rs:11:19
134+ |
135+ LL | pub const E: u8 = [5u8][1];
136+ | ------------------^^^^^^^^-
137+ | |
138+ | index out of bounds: the length is 1 but the index is 1
139+ |
140+ note: the lint level is defined here
141+ --> $DIR/const-err-early.rs:1:9
142+ |
143+ LL | #![deny(const_err)]
144+ | ^^^^^^^^^
145+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
146+ = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
147+
0 commit comments