Skip to content

Commit 8ed225a

Browse files
committed
does not work: make the test build-pass for the opt revision
1 parent 2d1acd9 commit 8ed225a

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error[E0080]: evaluation of `Fail::<i32>::C` failed
2-
--> $DIR/collect-in-dead-vtable.rs:11:19
2+
--> $DIR/collect-in-dead-vtable.rs:10:19
33
|
44
LL | const C: () = panic!();
5-
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-vtable.rs:11:19
5+
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-vtable.rs:10:19
66
|
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/collect-in-dead-vtable.rs:34:40
10+
--> $DIR/collect-in-dead-vtable.rs:33:40
1111
|
1212
LL | let gen_vtable: &dyn MyTrait = &v; // vtable "appears" here
1313
| ^^

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

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
//@revisions: no-opt
2-
//FIXME: `opt` revision currently does not stop with an error due to
3-
//<https://github.com/rust-lang/rust/issues/107503>.
4-
//@ build-fail
1+
//@revisions: no-opt opt
2+
//@[no-opt] build-fail
53
//@[opt] compile-flags: -O
4+
//@[opt] build-pass
65
//! Make sure we detect erroneous constants post-monomorphization even when they are unused. This is
76
//! crucial, people rely on it for soundness. (https://github.com/rust-lang/rust/issues/112090)
87

0 commit comments

Comments
 (0)