Skip to content

Commit

Permalink
bless remaining tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Jun 5, 2022
1 parent 00da0e7 commit 4a4d877
Show file tree
Hide file tree
Showing 6 changed files with 104 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/test/ui/consts/invalid-union.32bit.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,14 @@ LL | let _: &'static _ = &C;
error: aborting due to 2 previous errors

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

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

For more information about this error, try `rustc --explain E0080`.
Future incompatibility report: Future breakage diagnostic:
warning: any use of this value will cause an error
--> $DIR/const_refers_to_static_cross_crate.rs:25:15
|
LL | / const U8_MUT2: &u8 = {
LL | | unsafe { &(*static_cross_crate::ZERO_REF)[0] }
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
LL | |
LL | |
LL | |
LL | | };
| |__-
|
note: the lint level is defined here
--> $DIR/const_refers_to_static_cross_crate.rs:23:8
|
LL | #[warn(const_err)]
| ^^^^^^^^^
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>

Future breakage diagnostic:
warning: any use of this value will cause an error
--> $DIR/const_refers_to_static_cross_crate.rs:32:20
|
LL | / const U8_MUT3: &u8 = {
LL | | unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant accesses static
LL | |
LL | |
LL | |
LL | | };
| |__-
|
note: the lint level is defined here
--> $DIR/const_refers_to_static_cross_crate.rs:30:8
|
LL | #[warn(const_err)]
| ^^^^^^^^^
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>

12 changes: 12 additions & 0 deletions src/test/ui/limits/issue-55878.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,15 @@ LL | println!("Size: {}", std::mem::size_of::<[u8; u64::MAX as usize]>());
error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0080`.
Future incompatibility report: Future breakage diagnostic:
error: erroneous constant used
--> $DIR/issue-55878.rs:7:26
|
LL | println!("Size: {}", std::mem::size_of::<[u8; u64::MAX as usize]>());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
= note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)

Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,16 @@ LL | const C: i32 = 1 / 0;

warning: 1 warning emitted

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

13 changes: 13 additions & 0 deletions src/test/ui/lint/force-warn/allowed-deny-by-default-lint.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,16 @@ LL | const C: i32 = 1 / 0;

warning: 1 warning emitted

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

13 changes: 13 additions & 0 deletions src/test/ui/lint/force-warn/deny-by-default-lint.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,16 @@ LL | const C: i32 = 1 / 0;

warning: 1 warning emitted

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

0 comments on commit 4a4d877

Please sign in to comment.