Skip to content

Commit 61fee46

Browse files
committed
Fixup a few tests
1 parent 8ffe698 commit 61fee46

5 files changed

+7
-24
lines changed

tests/crashes/101962.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//@ known-bug: #101962
2+
//@ compile-flags: -Cdebuginfo=2
23

34
#![feature(core_intrinsics)]
45

tests/crashes/79409.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//@ known-bug: #79409
2+
//@ compile-flags: -Cdebuginfo=2
23

34
#![feature(extern_types)]
45
#![feature(unsized_locals)]

tests/ui/consts/required-consts/collect-in-promoted-const.noopt.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ 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: erroneous constant encountered
10-
--> $DIR/collect-in-promoted-const.rs:20:21
10+
--> $DIR/collect-in-promoted-const.rs:17:21
1111
|
1212
LL | let _val = &Fail::<T>::C;
1313
| ^^^^^^^^^^^^
1414

1515
note: the above error was encountered while instantiating `fn f::<i32>`
16-
--> $DIR/collect-in-promoted-const.rs:25:5
16+
--> $DIR/collect-in-promoted-const.rs:22:5
1717
|
1818
LL | f::<i32>();
1919
| ^^^^^^^^^^
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
error[E0080]: evaluation of `Fail::<T>::C` failed
2-
--> $DIR/collect-in-promoted-const.rs:9:19
3-
|
4-
LL | const C: () = panic!();
5-
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-promoted-const.rs:9:19
6-
|
7-
= 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)
8-
9-
note: erroneous constant encountered
10-
--> $DIR/collect-in-promoted-const.rs:20:21
11-
|
12-
LL | let _val = &Fail::<T>::C;
13-
| ^^^^^^^^^^^^
14-
151
error[E0080]: evaluation of `Fail::<i32>::C` failed
162
--> $DIR/collect-in-promoted-const.rs:9:19
173
|
@@ -21,19 +7,17 @@ LL | const C: () = panic!();
217
= 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)
228

239
note: erroneous constant encountered
24-
--> $DIR/collect-in-promoted-const.rs:20:21
10+
--> $DIR/collect-in-promoted-const.rs:17:21
2511
|
2612
LL | let _val = &Fail::<T>::C;
2713
| ^^^^^^^^^^^^
28-
|
29-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
3014

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

37-
error: aborting due to 2 previous errors
21+
error: aborting due to 1 previous error
3822

3923
For more information about this error, try `rustc --explain E0080`.

tests/ui/consts/required-consts/collect-in-promoted-const.rs

-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
struct Fail<T>(T);
88
impl<T> Fail<T> {
99
const C: () = panic!(); //~ERROR evaluation of `Fail::<i32>::C` failed
10-
//[opt]~^ ERROR evaluation of `Fail::<T>::C` failed
11-
// (Not sure why optimizations lead to this being emitted twice, but as long as compilation
12-
// fails either way it's fine.)
1310
}
1411

1512
#[inline(never)]

0 commit comments

Comments
 (0)