fix comments in required-consts tests

This commit is contained in:
Ralf Jung 2024-03-17 09:02:18 +01:00
parent 712fe36611
commit 91b35a1b40
12 changed files with 29 additions and 34 deletions

View File

@ -1,13 +1,13 @@
error[E0080]: evaluation of `Fail::<i32>::C` failed error[E0080]: evaluation of `Fail::<i32>::C` failed
--> $DIR/collect-in-dead-drop.rs:9:19 --> $DIR/collect-in-dead-drop.rs:8:19
| |
LL | const C: () = panic!(); LL | const C: () = panic!();
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-drop.rs:9:19 | ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-drop.rs:8:19
| |
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
note: erroneous constant encountered note: erroneous constant encountered
--> $DIR/collect-in-dead-drop.rs:16:17 --> $DIR/collect-in-dead-drop.rs:15:17
| |
LL | let _ = Fail::<T>::C; LL | let _ = Fail::<T>::C;
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^

View File

@ -1,13 +1,13 @@
error[E0080]: evaluation of `Fail::<i32>::C` failed error[E0080]: evaluation of `Fail::<i32>::C` failed
--> $DIR/collect-in-dead-drop.rs:9:19 --> $DIR/collect-in-dead-drop.rs:8:19
| |
LL | const C: () = panic!(); LL | const C: () = panic!();
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-drop.rs:9:19 | ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-drop.rs:8:19
| |
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
note: erroneous constant encountered note: erroneous constant encountered
--> $DIR/collect-in-dead-drop.rs:16:17 --> $DIR/collect-in-dead-drop.rs:15:17
| |
LL | let _ = Fail::<T>::C; LL | let _ = Fail::<T>::C;
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^

View File

@ -1,8 +1,7 @@
//@revisions: noopt opt //@revisions: noopt opt
//@ build-fail //@ build-fail
//@[opt] compile-flags: -O //@[opt] compile-flags: -O
//! Make sure we detect erroneous constants post-monomorphization even when they are unused. This is //! This fails without optimizations, so it should also fail with optimizations.
//! crucial, people rely on it for soundness. (https://github.com/rust-lang/rust/issues/112090)
struct Fail<T>(T); struct Fail<T>(T);
impl<T> Fail<T> { impl<T> Fail<T> {

View File

@ -1,19 +1,19 @@
error[E0080]: evaluation of `Fail::<i32>::C` failed error[E0080]: evaluation of `Fail::<i32>::C` failed
--> $DIR/collect-in-dead-fn.rs:9:19 --> $DIR/collect-in-dead-fn.rs:8:19
| |
LL | const C: () = panic!(); LL | const C: () = panic!();
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-fn.rs:9:19 | ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-fn.rs:8:19
| |
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
note: erroneous constant encountered note: erroneous constant encountered
--> $DIR/collect-in-dead-fn.rs:19:17 --> $DIR/collect-in-dead-fn.rs:18:17
| |
LL | let _ = Fail::<T>::C; LL | let _ = Fail::<T>::C;
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^
note: the above error was encountered while instantiating `fn not_called::<i32>` note: the above error was encountered while instantiating `fn not_called::<i32>`
--> $DIR/collect-in-dead-fn.rs:26:9 --> $DIR/collect-in-dead-fn.rs:25:9
| |
LL | not_called::<T>(); LL | not_called::<T>();
| ^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^

View File

@ -1,19 +1,19 @@
error[E0080]: evaluation of `Fail::<i32>::C` failed error[E0080]: evaluation of `Fail::<i32>::C` failed
--> $DIR/collect-in-dead-fn.rs:9:19 --> $DIR/collect-in-dead-fn.rs:8:19
| |
LL | const C: () = panic!(); LL | const C: () = panic!();
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-fn.rs:9:19 | ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-fn.rs:8:19
| |
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
note: erroneous constant encountered note: erroneous constant encountered
--> $DIR/collect-in-dead-fn.rs:19:17 --> $DIR/collect-in-dead-fn.rs:18:17
| |
LL | let _ = Fail::<T>::C; LL | let _ = Fail::<T>::C;
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^
note: the above error was encountered while instantiating `fn not_called::<i32>` note: the above error was encountered while instantiating `fn not_called::<i32>`
--> $DIR/collect-in-dead-fn.rs:26:9 --> $DIR/collect-in-dead-fn.rs:25:9
| |
LL | not_called::<T>(); LL | not_called::<T>();
| ^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^

View File

@ -1,8 +1,7 @@
//@revisions: noopt opt //@revisions: noopt opt
//@ build-fail //@ build-fail
//@[opt] compile-flags: -O //@[opt] compile-flags: -O
//! Make sure we detect erroneous constants post-monomorphization even when they are unused. This is //! This fails without optimizations, so it should also fail with optimizations.
//! crucial, people rely on it for soundness. (https://github.com/rust-lang/rust/issues/112090)
struct Fail<T>(T); struct Fail<T>(T);
impl<T> Fail<T> { impl<T> Fail<T> {

View File

@ -1,8 +1,7 @@
//@revisions: noopt opt //@revisions: noopt opt
//@build-pass //@build-pass
//@[opt] compile-flags: -O //@[opt] compile-flags: -O
//! Make sure we detect erroneous constants post-monomorphization even when they are unused. This is //! This passes without optimizations, so it can (and should) also pass with optimizations.
//! crucial, people rely on it for soundness. (https://github.com/rust-lang/rust/issues/112090)
struct Fail<T>(T); struct Fail<T>(T);
impl<T> Fail<T> { impl<T> Fail<T> {

View File

@ -1,13 +1,13 @@
error[E0080]: evaluation of `Fail::<i32>::C` failed error[E0080]: evaluation of `Fail::<i32>::C` failed
--> $DIR/collect-in-dead-move.rs:9:19 --> $DIR/collect-in-dead-move.rs:8:19
| |
LL | const C: () = panic!(); LL | const C: () = panic!();
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-move.rs:9:19 | ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-move.rs:8:19
| |
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
note: erroneous constant encountered note: erroneous constant encountered
--> $DIR/collect-in-dead-move.rs:16:17 --> $DIR/collect-in-dead-move.rs:15:17
| |
LL | let _ = Fail::<T>::C; LL | let _ = Fail::<T>::C;
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^

View File

@ -1,13 +1,13 @@
error[E0080]: evaluation of `Fail::<i32>::C` failed error[E0080]: evaluation of `Fail::<i32>::C` failed
--> $DIR/collect-in-dead-move.rs:9:19 --> $DIR/collect-in-dead-move.rs:8:19
| |
LL | const C: () = panic!(); LL | const C: () = panic!();
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-move.rs:9:19 | ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-move.rs:8:19
| |
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
note: erroneous constant encountered note: erroneous constant encountered
--> $DIR/collect-in-dead-move.rs:16:17 --> $DIR/collect-in-dead-move.rs:15:17
| |
LL | let _ = Fail::<T>::C; LL | let _ = Fail::<T>::C;
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^

View File

@ -1,8 +1,7 @@
//@revisions: noopt opt //@revisions: noopt opt
//@ build-fail //@ build-fail
//@[opt] compile-flags: -O //@[opt] compile-flags: -O
//! Make sure we detect erroneous constants post-monomorphization even when they are unused. This is //! This fails without optimizations, so it should also fail with optimizations.
//! crucial, people rely on it for soundness. (https://github.com/rust-lang/rust/issues/112090)
struct Fail<T>(T); struct Fail<T>(T);
impl<T> Fail<T> { impl<T> Fail<T> {

View File

@ -1,19 +1,19 @@
error[E0080]: evaluation of `Fail::<i32>::C` failed error[E0080]: evaluation of `Fail::<i32>::C` failed
--> $DIR/collect-in-dead-vtable.rs:12:19 --> $DIR/collect-in-dead-vtable.rs:11:19
| |
LL | const C: () = panic!(); LL | const C: () = panic!();
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-vtable.rs:12:19 | ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-vtable.rs:11:19
| |
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
note: erroneous constant encountered note: erroneous constant encountered
--> $DIR/collect-in-dead-vtable.rs:26:21 --> $DIR/collect-in-dead-vtable.rs:25:21
| |
LL | let _ = Fail::<T>::C; LL | let _ = Fail::<T>::C;
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^
note: the above error was encountered while instantiating `fn <std::vec::Vec<i32> as MyTrait>::not_called` note: the above error was encountered while instantiating `fn <std::vec::Vec<i32> as MyTrait>::not_called`
--> $DIR/collect-in-dead-vtable.rs:35:40 --> $DIR/collect-in-dead-vtable.rs:34:40
| |
LL | let gen_vtable: &dyn MyTrait = &v; // vtable "appears" here LL | let gen_vtable: &dyn MyTrait = &v; // vtable "appears" here
| ^^ | ^^

View File

@ -4,8 +4,7 @@
//FIXME: `opt` revision currently does not stop with an error due to //FIXME: `opt` revision currently does not stop with an error due to
//<https://github.com/rust-lang/rust/issues/107503>. //<https://github.com/rust-lang/rust/issues/107503>.
//@[opt] build-pass //@[opt] build-pass
//! Make sure we detect erroneous constants post-monomorphization even when they are unused. This is //! This fails without optimizations, so it should also fail with optimizations.
//! crucial, people rely on it for soundness. (https://github.com/rust-lang/rust/issues/112090)
struct Fail<T>(T); struct Fail<T>(T);
impl<T> Fail<T> { impl<T> Fail<T> {