Skip to content

Commit 7eddf25

Browse files
committed
adjust tests to reality
1 parent f2b8866 commit 7eddf25

File tree

4 files changed

+13
-21
lines changed

4 files changed

+13
-21
lines changed

tests/ui/consts/required-consts/dead-code-in-dead-drop.opt.stderr

-14
This file was deleted.

tests/ui/consts/required-consts/dead-code-in-dead-drop.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
//@revisions: opt no-opt
2-
//@ build-fail
1+
//@revisions: noopt opt
2+
//@[noopt] build-fail
33
//@[opt] compile-flags: -O
4+
//FIXME: `opt` revision currently does not stop with an error due to
5+
//<https://github.com/rust-lang/rust/issues/107503>.
6+
//@[opt] build-pass
47
//! Make sure we detect erroneous constants post-monomorphization even when they are unused. This is
58
//! crucial, people rely on it for soundness. (https://github.com/rust-lang/rust/issues/112090)
69
710
struct Fail<T>(T);
811
impl<T> Fail<T> {
9-
const C: () = panic!(); //~ERROR evaluation of `Fail::<i32>::C` failed
12+
const C: () = panic!(); //[noopt]~ERROR evaluation of `Fail::<i32>::C` failed
1013
}
1114

1215
// This function is not actually called, but is mentioned implicitly as destructor in dead code in a

tests/ui/consts/required-consts/dead-code-in-dead-vtable.no-opt.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | const C: () = panic!();
77
= 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)
88

99
note: the above error was encountered while instantiating `fn <std::vec::Vec<i32> as MyTrait>::not_called`
10-
--> $DIR/dead-code-in-dead-vtable.rs:30:40
10+
--> $DIR/dead-code-in-dead-vtable.rs:32:40
1111
|
1212
LL | let gen_vtable: &dyn MyTrait = &v; // vtable "appears" here
1313
| ^^

tests/ui/consts/required-consts/dead-code-in-dead-vtable.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
//@revisions: opt no-opt
2-
//@ build-fail
1+
//@revisions: noopt opt
2+
//@[noopt] build-fail
33
//@[opt] compile-flags: -O
4+
//FIXME: `opt` revision currently does not stop with an error due to
5+
//<https://github.com/rust-lang/rust/issues/107503>.
6+
//@[opt] build-pass
47
//! Make sure we detect erroneous constants post-monomorphization even when they are unused. This is
58
//! crucial, people rely on it for soundness. (https://github.com/rust-lang/rust/issues/112090)
69
710
struct Fail<T>(T);
811
impl<T> Fail<T> {
9-
const C: () = panic!(); //~ERROR evaluation of `Fail::<i32>::C` failed
12+
const C: () = panic!(); //[noopt]~ERROR evaluation of `Fail::<i32>::C` failed
1013
}
1114

1215
trait MyTrait {

0 commit comments

Comments
 (0)