Skip to content

Commit 4a4d877

Browse files
committed
bless remaining tests
1 parent 00da0e7 commit 4a4d877

6 files changed

+104
-0
lines changed

src/test/ui/consts/invalid-union.32bit.stderr

+11
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,14 @@ LL | let _: &'static _ = &C;
2222
error: aborting due to 2 previous errors
2323

2424
For more information about this error, try `rustc --explain E0080`.
25+
Future incompatibility report: Future breakage diagnostic:
26+
error: erroneous constant used
27+
--> $DIR/invalid-union.rs:41:25
28+
|
29+
LL | let _: &'static _ = &C;
30+
| ^^ referenced constant has errors
31+
|
32+
= note: `#[deny(const_err)]` on by default
33+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
34+
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
35+

src/test/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr

+42
Original file line numberDiff line numberDiff line change
@@ -170,3 +170,45 @@ LL | unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None =>
170170
error: aborting due to 10 previous errors; 3 warnings emitted
171171

172172
For more information about this error, try `rustc --explain E0080`.
173+
Future incompatibility report: Future breakage diagnostic:
174+
warning: any use of this value will cause an error
175+
--> $DIR/const_refers_to_static_cross_crate.rs:25:15
176+
|
177+
LL | / const U8_MUT2: &u8 = {
178+
LL | | unsafe { &(*static_cross_crate::ZERO_REF)[0] }
179+
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
180+
LL | |
181+
LL | |
182+
LL | |
183+
LL | | };
184+
| |__-
185+
|
186+
note: the lint level is defined here
187+
--> $DIR/const_refers_to_static_cross_crate.rs:23:8
188+
|
189+
LL | #[warn(const_err)]
190+
| ^^^^^^^^^
191+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
192+
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
193+
194+
Future breakage diagnostic:
195+
warning: any use of this value will cause an error
196+
--> $DIR/const_refers_to_static_cross_crate.rs:32:20
197+
|
198+
LL | / const U8_MUT3: &u8 = {
199+
LL | | unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
200+
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
201+
LL | |
202+
LL | |
203+
LL | |
204+
LL | | };
205+
| |__-
206+
|
207+
note: the lint level is defined here
208+
--> $DIR/const_refers_to_static_cross_crate.rs:30:8
209+
|
210+
LL | #[warn(const_err)]
211+
| ^^^^^^^^^
212+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
213+
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
214+

src/test/ui/limits/issue-55878.stderr

+12
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,15 @@ LL | println!("Size: {}", std::mem::size_of::<[u8; u64::MAX as usize]>());
2323
error: aborting due to 2 previous errors
2424

2525
For more information about this error, try `rustc --explain E0080`.
26+
Future incompatibility report: Future breakage diagnostic:
27+
error: erroneous constant used
28+
--> $DIR/issue-55878.rs:7:26
29+
|
30+
LL | println!("Size: {}", std::mem::size_of::<[u8; u64::MAX as usize]>());
31+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
32+
|
33+
= note: `#[deny(const_err)]` on by default
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 #71800 <https://github.com/rust-lang/rust/issues/71800>
36+
= note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
37+

src/test/ui/lint/force-warn/allowed-cli-deny-by-default-lint.stderr

+13
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,16 @@ LL | const C: i32 = 1 / 0;
1212

1313
warning: 1 warning emitted
1414

15+
Future incompatibility report: Future breakage diagnostic:
16+
warning: any use of this value will cause an error
17+
--> $DIR/allowed-cli-deny-by-default-lint.rs:6:16
18+
|
19+
LL | const C: i32 = 1 / 0;
20+
| ---------------^^^^^-
21+
| |
22+
| attempt to divide `1_i32` by zero
23+
|
24+
= note: requested on the command line with `--force-warn const-err`
25+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
26+
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
27+

src/test/ui/lint/force-warn/allowed-deny-by-default-lint.stderr

+13
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,16 @@ LL | const C: i32 = 1 / 0;
1212

1313
warning: 1 warning emitted
1414

15+
Future incompatibility report: Future breakage diagnostic:
16+
warning: any use of this value will cause an error
17+
--> $DIR/allowed-deny-by-default-lint.rs:7:16
18+
|
19+
LL | const C: i32 = 1 / 0;
20+
| ---------------^^^^^-
21+
| |
22+
| attempt to divide `1_i32` by zero
23+
|
24+
= note: requested on the command line with `--force-warn const-err`
25+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
26+
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
27+

src/test/ui/lint/force-warn/deny-by-default-lint.stderr

+13
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,16 @@ LL | const C: i32 = 1 / 0;
1212

1313
warning: 1 warning emitted
1414

15+
Future incompatibility report: Future breakage diagnostic:
16+
warning: any use of this value will cause an error
17+
--> $DIR/deny-by-default-lint.rs:5:16
18+
|
19+
LL | const C: i32 = 1 / 0;
20+
| ---------------^^^^^-
21+
| |
22+
| attempt to divide `1_i32` by zero
23+
|
24+
= note: requested on the command line with `--force-warn const-err`
25+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
26+
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
27+

0 commit comments

Comments
 (0)