Skip to content

Commit

Permalink
Fixup a few tests
Browse files Browse the repository at this point in the history
  • Loading branch information
saethlin committed Jun 4, 2024
1 parent e8d0b68 commit 517dfc0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 24 deletions.
1 change: 1 addition & 0 deletions tests/crashes/101962.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//@ known-bug: #101962
//@ compile-flags: -Cdebuginfo=2

#![feature(core_intrinsics)]

Expand Down
1 change: 1 addition & 0 deletions tests/crashes/79409.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//@ known-bug: #79409
//@ compile-flags: -Cdebuginfo=2

#![feature(extern_types)]
#![feature(unsized_locals)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ LL | const C: () = panic!();
= 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
--> $DIR/collect-in-promoted-const.rs:20:21
--> $DIR/collect-in-promoted-const.rs:17:21
|
LL | let _val = &Fail::<T>::C;
| ^^^^^^^^^^^^

note: the above error was encountered while instantiating `fn f::<i32>`
--> $DIR/collect-in-promoted-const.rs:25:5
--> $DIR/collect-in-promoted-const.rs:22:5
|
LL | f::<i32>();
| ^^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
error[E0080]: evaluation of `Fail::<T>::C` failed
--> $DIR/collect-in-promoted-const.rs:9:19
|
LL | const C: () = panic!();
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-promoted-const.rs:9: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: erroneous constant encountered
--> $DIR/collect-in-promoted-const.rs:20:21
|
LL | let _val = &Fail::<T>::C;
| ^^^^^^^^^^^^

error[E0080]: evaluation of `Fail::<i32>::C` failed
--> $DIR/collect-in-promoted-const.rs:9:19
|
Expand All @@ -21,19 +7,17 @@ LL | const C: () = panic!();
= 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
--> $DIR/collect-in-promoted-const.rs:20:21
--> $DIR/collect-in-promoted-const.rs:17:21
|
LL | let _val = &Fail::<T>::C;
| ^^^^^^^^^^^^
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

note: the above error was encountered while instantiating `fn f::<i32>`
--> $DIR/collect-in-promoted-const.rs:25:5
--> $DIR/collect-in-promoted-const.rs:22:5
|
LL | f::<i32>();
| ^^^^^^^^^^

error: aborting due to 2 previous errors
error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0080`.
3 changes: 0 additions & 3 deletions tests/ui/consts/required-consts/collect-in-promoted-const.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
struct Fail<T>(T);
impl<T> Fail<T> {
const C: () = panic!(); //~ERROR evaluation of `Fail::<i32>::C` failed
//[opt]~^ ERROR evaluation of `Fail::<T>::C` failed
// (Not sure why optimizations lead to this being emitted twice, but as long as compilation
// fails either way it's fine.)
}

#[inline(never)]
Expand Down

0 comments on commit 517dfc0

Please sign in to comment.