Skip to content

Commit 030e3d4

Browse files
committed
Remove special casing of const panic label
1 parent 6d8627e commit 030e3d4

File tree

62 files changed

+97
-107
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+97
-107
lines changed

compiler/rustc_const_eval/messages.ftl

+1-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ const_eval_overflow_arith =
302302
const_eval_overflow_shift =
303303
overflowing shift by {$shift_amount} in `{$intrinsic}`
304304
305-
const_eval_panic = panic: {$msg}
305+
const_eval_panic = evaluation panicked: {$msg}
306306
307307
const_eval_panic_non_str = argument to `panic!()` in a const context must have type `&str`
308308

compiler/rustc_const_eval/src/const_eval/error.rs

+1-11
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,7 @@ impl MachineStopType for ConstEvalErrKind {
3434
match self {
3535
ConstAccessesMutGlobal => const_eval_const_accesses_mut_global,
3636
ModifiedGlobal => const_eval_modified_global,
37-
Panic { msg, .. } => {
38-
let msg = msg.as_str();
39-
match msg {
40-
"explicit panic"
41-
| "not implemented"
42-
| "not yet implemented"
43-
| "internal error: entered unreachable code" => msg.to_string().into(),
44-
_ if msg.starts_with("assertion failed: ") => msg.to_string().into(),
45-
_ => const_eval_panic,
46-
}
47-
}
37+
Panic { .. } => const_eval_panic,
4838
RecursiveStatic => const_eval_recursive_static,
4939
AssertFailure(x) => x.diagnostic_message(),
5040
WriteThroughImmutablePointer => const_eval_write_through_immutable_pointer,

src/tools/miri/tests/fail/erroneous_const.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0080]: evaluation of `PrintName::<i32>::VOID` failed
22
--> tests/fail/erroneous_const.rs:LL:CC
33
|
44
LL | const VOID: ! = panic!();
5-
| ^^^^^^^^ explicit panic
5+
| ^^^^^^^^ evaluation panicked: explicit panic
66
|
77
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
88

tests/ui/borrowck/issue-81899.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0080]: evaluation of constant value failed
22
--> $DIR/issue-81899.rs:4:24
33
|
44
LL | const _CONST: &[u8] = &f(&[], |_| {});
5-
| ^^^^^^^^^^^^^^ explicit panic
5+
| ^^^^^^^^^^^^^^ evaluation panicked: explicit panic
66
|
77
note: inside `f::<{closure@$DIR/issue-81899.rs:4:31: 4:34}>`
88
--> $DIR/issue-81899.rs:11:5

tests/ui/borrowck/issue-88434-minimal-example.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0080]: evaluation of constant value failed
22
--> $DIR/issue-88434-minimal-example.rs:3:22
33
|
44
LL | const _CONST: &() = &f(&|_| {});
5-
| ^^^^^^^^^^ explicit panic
5+
| ^^^^^^^^^^ evaluation panicked: explicit panic
66
|
77
note: inside `f::<{closure@$DIR/issue-88434-minimal-example.rs:3:25: 3:28}>`
88
--> $DIR/issue-88434-minimal-example.rs:10:5

tests/ui/borrowck/issue-88434-removal-index-should-be-less.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0080]: evaluation of constant value failed
22
--> $DIR/issue-88434-removal-index-should-be-less.rs:3:24
33
|
44
LL | const _CONST: &[u8] = &f(&[], |_| {});
5-
| ^^^^^^^^^^^^^^ explicit panic
5+
| ^^^^^^^^^^^^^^ evaluation panicked: explicit panic
66
|
77
note: inside `f::<{closure@$DIR/issue-88434-removal-index-should-be-less.rs:3:31: 3:34}>`
88
--> $DIR/issue-88434-removal-index-should-be-less.rs:10:5

tests/ui/coherence/const-errs-dont-conflict-103369.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0080]: evaluation of constant value failed
22
--> $DIR/const-errs-dont-conflict-103369.rs:5:25
33
|
44
LL | impl ConstGenericTrait<{my_fn(1)}> for () {}
5-
| ^^^^^^^^ panic: Some error occurred
5+
| ^^^^^^^^ evaluation panicked: Some error occurred
66
|
77
note: inside `my_fn`
88
--> $DIR/const-errs-dont-conflict-103369.rs:10:5
@@ -15,7 +15,7 @@ error[E0080]: evaluation of constant value failed
1515
--> $DIR/const-errs-dont-conflict-103369.rs:7:25
1616
|
1717
LL | impl ConstGenericTrait<{my_fn(2)}> for () {}
18-
| ^^^^^^^^ panic: Some error occurred
18+
| ^^^^^^^^ evaluation panicked: Some error occurred
1919
|
2020
note: inside `my_fn`
2121
--> $DIR/const-errs-dont-conflict-103369.rs:10:5

tests/ui/const-ptr/forbidden_slices.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@ error[E0080]: could not evaluate static initializer
103103
--> $DIR/forbidden_slices.rs:50:33
104104
|
105105
LL | pub static R1: &[()] = unsafe { from_ptr_range(ptr::null()..ptr::null()) }; // errors inside libcore
106-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ assertion failed: 0 < pointee_size && pointee_size <= isize::MAX as usize
106+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: assertion failed: 0 < pointee_size && pointee_size <= isize::MAX as usize
107107
|
108108
note: inside `from_ptr_range::<'_, ()>`
109109
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
110-
note: inside `std::ptr::const_ptr::<impl *const ()>::sub_ptr`
110+
note: inside `std::ptr::const_ptr::<impl *const ()>::offset_from_unsigned`
111111
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
112112
|
113113
= note: the failure occurred here
@@ -189,7 +189,7 @@ LL | pub static R9: &[u32] = unsafe { from_ptr_range(&D0..(&D0 as *const u32).ad
189189
|
190190
note: inside `from_ptr_range::<'_, u32>`
191191
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
192-
note: inside `std::ptr::const_ptr::<impl *const u32>::sub_ptr`
192+
note: inside `std::ptr::const_ptr::<impl *const u32>::offset_from_unsigned`
193193
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
194194
|
195195
= note: the failure occurred here
@@ -202,7 +202,7 @@ LL | pub static R10: &[u32] = unsafe { from_ptr_range(&D0..&D0) };
202202
|
203203
note: inside `from_ptr_range::<'_, u32>`
204204
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
205-
note: inside `std::ptr::const_ptr::<impl *const u32>::sub_ptr`
205+
note: inside `std::ptr::const_ptr::<impl *const u32>::offset_from_unsigned`
206206
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
207207
|
208208
= note: the failure occurred here

tests/ui/consts/assert-type-intrinsics.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ error[E0080]: evaluation of constant value failed
22
--> $DIR/assert-type-intrinsics.rs:11:9
33
|
44
LL | MaybeUninit::<!>::uninit().assume_init();
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ panic: aborted execution: attempted to instantiate uninhabited type `!`
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: aborted execution: attempted to instantiate uninhabited type `!`
66

77
error[E0080]: evaluation of constant value failed
88
--> $DIR/assert-type-intrinsics.rs:15:9
99
|
1010
LL | intrinsics::assert_mem_uninitialized_valid::<&'static i32>();
11-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ panic: aborted execution: attempted to leave type `&i32` uninitialized, which is invalid
11+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: aborted execution: attempted to leave type `&i32` uninitialized, which is invalid
1212

1313
error[E0080]: evaluation of constant value failed
1414
--> $DIR/assert-type-intrinsics.rs:19:9
1515
|
1616
LL | intrinsics::assert_zero_valid::<&'static i32>();
17-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ panic: aborted execution: attempted to zero-initialize type `&i32`, which is invalid
17+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: aborted execution: attempted to zero-initialize type `&i32`, which is invalid
1818

1919
error: aborting due to 3 previous errors
2020

tests/ui/consts/const-eval/const_panic-normalize-tabs-115498.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0080]: evaluation of constant value failed
22
--> $DIR/const_panic-normalize-tabs-115498.rs:3:17
33
|
44
LL | struct Bug([u8; panic!{"\t"}]);
5-
| ^^^^^^^^^^^^ panic:
5+
| ^^^^^^^^^^^^ evaluation panicked:
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

tests/ui/consts/const-eval/const_panic.stderr

+12-12
Original file line numberDiff line numberDiff line change
@@ -2,95 +2,95 @@ error[E0080]: evaluation of constant value failed
22
--> $DIR/const_panic.rs:6:15
33
|
44
LL | const Z: () = std::panic!("cheese");
5-
| ^^^^^^^^^^^^^^^^^^^^^ panic: cheese
5+
| ^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: cheese
66
|
77
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `std::panic` (in Nightly builds, run with -Z macro-backtrace for more info)
88

99
error[E0080]: evaluation of constant value failed
1010
--> $DIR/const_panic.rs:9:16
1111
|
1212
LL | const Z2: () = std::panic!();
13-
| ^^^^^^^^^^^^^ explicit panic
13+
| ^^^^^^^^^^^^^ evaluation panicked: explicit panic
1414
|
1515
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `std::panic` (in Nightly builds, run with -Z macro-backtrace for more info)
1616

1717
error[E0080]: evaluation of constant value failed
1818
--> $DIR/const_panic.rs:12:15
1919
|
2020
LL | const Y: () = std::unreachable!();
21-
| ^^^^^^^^^^^^^^^^^^^ internal error: entered unreachable code
21+
| ^^^^^^^^^^^^^^^^^^^ evaluation panicked: internal error: entered unreachable code
2222
|
2323
= note: this error originates in the macro `$crate::panic::unreachable_2015` which comes from the expansion of the macro `std::unreachable` (in Nightly builds, run with -Z macro-backtrace for more info)
2424

2525
error[E0080]: evaluation of constant value failed
2626
--> $DIR/const_panic.rs:15:15
2727
|
2828
LL | const X: () = std::unimplemented!();
29-
| ^^^^^^^^^^^^^^^^^^^^^ not implemented
29+
| ^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: not implemented
3030
|
3131
= note: this error originates in the macro `std::unimplemented` (in Nightly builds, run with -Z macro-backtrace for more info)
3232

3333
error[E0080]: evaluation of constant value failed
3434
--> $DIR/const_panic.rs:18:15
3535
|
3636
LL | const W: () = std::panic!(MSG);
37-
| ^^^^^^^^^^^^^^^^ panic: hello
37+
| ^^^^^^^^^^^^^^^^ evaluation panicked: hello
3838
|
3939
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `std::panic` (in Nightly builds, run with -Z macro-backtrace for more info)
4040

4141
error[E0080]: evaluation of constant value failed
4242
--> $DIR/const_panic.rs:21:16
4343
|
4444
LL | const W2: () = std::panic!("{}", MSG);
45-
| ^^^^^^^^^^^^^^^^^^^^^^ panic: hello
45+
| ^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: hello
4646
|
4747
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `std::panic` (in Nightly builds, run with -Z macro-backtrace for more info)
4848

4949
error[E0080]: evaluation of constant value failed
5050
--> $DIR/const_panic.rs:24:20
5151
|
5252
LL | const Z_CORE: () = core::panic!("cheese");
53-
| ^^^^^^^^^^^^^^^^^^^^^^ panic: cheese
53+
| ^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: cheese
5454
|
5555
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `core::panic` (in Nightly builds, run with -Z macro-backtrace for more info)
5656

5757
error[E0080]: evaluation of constant value failed
5858
--> $DIR/const_panic.rs:27:21
5959
|
6060
LL | const Z2_CORE: () = core::panic!();
61-
| ^^^^^^^^^^^^^^ explicit panic
61+
| ^^^^^^^^^^^^^^ evaluation panicked: explicit panic
6262
|
6363
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `core::panic` (in Nightly builds, run with -Z macro-backtrace for more info)
6464

6565
error[E0080]: evaluation of constant value failed
6666
--> $DIR/const_panic.rs:30:20
6767
|
6868
LL | const Y_CORE: () = core::unreachable!();
69-
| ^^^^^^^^^^^^^^^^^^^^ internal error: entered unreachable code
69+
| ^^^^^^^^^^^^^^^^^^^^ evaluation panicked: internal error: entered unreachable code
7070
|
7171
= note: this error originates in the macro `$crate::panic::unreachable_2015` which comes from the expansion of the macro `core::unreachable` (in Nightly builds, run with -Z macro-backtrace for more info)
7272

7373
error[E0080]: evaluation of constant value failed
7474
--> $DIR/const_panic.rs:33:20
7575
|
7676
LL | const X_CORE: () = core::unimplemented!();
77-
| ^^^^^^^^^^^^^^^^^^^^^^ not implemented
77+
| ^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: not implemented
7878
|
7979
= note: this error originates in the macro `core::unimplemented` (in Nightly builds, run with -Z macro-backtrace for more info)
8080

8181
error[E0080]: evaluation of constant value failed
8282
--> $DIR/const_panic.rs:36:20
8383
|
8484
LL | const W_CORE: () = core::panic!(MSG);
85-
| ^^^^^^^^^^^^^^^^^ panic: hello
85+
| ^^^^^^^^^^^^^^^^^ evaluation panicked: hello
8686
|
8787
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `core::panic` (in Nightly builds, run with -Z macro-backtrace for more info)
8888

8989
error[E0080]: evaluation of constant value failed
9090
--> $DIR/const_panic.rs:39:21
9191
|
9292
LL | const W2_CORE: () = core::panic!("{}", MSG);
93-
| ^^^^^^^^^^^^^^^^^^^^^^^ panic: hello
93+
| ^^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: hello
9494
|
9595
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `core::panic` (in Nightly builds, run with -Z macro-backtrace for more info)
9696

tests/ui/consts/const-eval/const_panic_2021.stderr

+10-10
Original file line numberDiff line numberDiff line change
@@ -2,79 +2,79 @@ error[E0080]: evaluation of constant value failed
22
--> $DIR/const_panic_2021.rs:6:15
33
|
44
LL | const A: () = std::panic!("blåhaj");
5-
| ^^^^^^^^^^^^^^^^^^^^^ panic: blåhaj
5+
| ^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: blåhaj
66
|
77
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `std::panic` (in Nightly builds, run with -Z macro-backtrace for more info)
88

99
error[E0080]: evaluation of constant value failed
1010
--> $DIR/const_panic_2021.rs:9:15
1111
|
1212
LL | const B: () = std::panic!();
13-
| ^^^^^^^^^^^^^ explicit panic
13+
| ^^^^^^^^^^^^^ evaluation panicked: explicit panic
1414
|
1515
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `std::panic` (in Nightly builds, run with -Z macro-backtrace for more info)
1616

1717
error[E0080]: evaluation of constant value failed
1818
--> $DIR/const_panic_2021.rs:12:15
1919
|
2020
LL | const C: () = std::unreachable!();
21-
| ^^^^^^^^^^^^^^^^^^^ internal error: entered unreachable code
21+
| ^^^^^^^^^^^^^^^^^^^ evaluation panicked: internal error: entered unreachable code
2222
|
2323
= note: this error originates in the macro `$crate::panic::unreachable_2021` which comes from the expansion of the macro `std::unreachable` (in Nightly builds, run with -Z macro-backtrace for more info)
2424

2525
error[E0080]: evaluation of constant value failed
2626
--> $DIR/const_panic_2021.rs:15:15
2727
|
2828
LL | const D: () = std::unimplemented!();
29-
| ^^^^^^^^^^^^^^^^^^^^^ not implemented
29+
| ^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: not implemented
3030
|
3131
= note: this error originates in the macro `std::unimplemented` (in Nightly builds, run with -Z macro-backtrace for more info)
3232

3333
error[E0080]: evaluation of constant value failed
3434
--> $DIR/const_panic_2021.rs:18:15
3535
|
3636
LL | const E: () = std::panic!("{}", MSG);
37-
| ^^^^^^^^^^^^^^^^^^^^^^ panic: hello
37+
| ^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: hello
3838
|
3939
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `std::panic` (in Nightly builds, run with -Z macro-backtrace for more info)
4040

4141
error[E0080]: evaluation of constant value failed
4242
--> $DIR/const_panic_2021.rs:21:20
4343
|
4444
LL | const A_CORE: () = core::panic!("shark");
45-
| ^^^^^^^^^^^^^^^^^^^^^ panic: shark
45+
| ^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: shark
4646
|
4747
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `core::panic` (in Nightly builds, run with -Z macro-backtrace for more info)
4848

4949
error[E0080]: evaluation of constant value failed
5050
--> $DIR/const_panic_2021.rs:24:20
5151
|
5252
LL | const B_CORE: () = core::panic!();
53-
| ^^^^^^^^^^^^^^ explicit panic
53+
| ^^^^^^^^^^^^^^ evaluation panicked: explicit panic
5454
|
5555
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `core::panic` (in Nightly builds, run with -Z macro-backtrace for more info)
5656

5757
error[E0080]: evaluation of constant value failed
5858
--> $DIR/const_panic_2021.rs:27:20
5959
|
6060
LL | const C_CORE: () = core::unreachable!();
61-
| ^^^^^^^^^^^^^^^^^^^^ internal error: entered unreachable code
61+
| ^^^^^^^^^^^^^^^^^^^^ evaluation panicked: internal error: entered unreachable code
6262
|
6363
= note: this error originates in the macro `$crate::panic::unreachable_2021` which comes from the expansion of the macro `core::unreachable` (in Nightly builds, run with -Z macro-backtrace for more info)
6464

6565
error[E0080]: evaluation of constant value failed
6666
--> $DIR/const_panic_2021.rs:30:20
6767
|
6868
LL | const D_CORE: () = core::unimplemented!();
69-
| ^^^^^^^^^^^^^^^^^^^^^^ not implemented
69+
| ^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: not implemented
7070
|
7171
= note: this error originates in the macro `core::unimplemented` (in Nightly builds, run with -Z macro-backtrace for more info)
7272

7373
error[E0080]: evaluation of constant value failed
7474
--> $DIR/const_panic_2021.rs:33:20
7575
|
7676
LL | const E_CORE: () = core::panic!("{}", MSG);
77-
| ^^^^^^^^^^^^^^^^^^^^^^^ panic: hello
77+
| ^^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: hello
7878
|
7979
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `core::panic` (in Nightly builds, run with -Z macro-backtrace for more info)
8080

tests/ui/consts/const-eval/const_panic_libcore_bin.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@ error[E0080]: evaluation of constant value failed
22
--> $DIR/const_panic_libcore_bin.rs:8:15
33
|
44
LL | const Z: () = panic!("cheese");
5-
| ^^^^^^^^^^^^^^^^ panic: cheese
5+
| ^^^^^^^^^^^^^^^^ evaluation panicked: cheese
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
error[E0080]: evaluation of constant value failed
1010
--> $DIR/const_panic_libcore_bin.rs:11:15
1111
|
1212
LL | const Y: () = unreachable!();
13-
| ^^^^^^^^^^^^^^ internal error: entered unreachable code
13+
| ^^^^^^^^^^^^^^ evaluation panicked: internal error: entered unreachable code
1414
|
1515
= note: this error originates in the macro `$crate::panic::unreachable_2015` which comes from the expansion of the macro `unreachable` (in Nightly builds, run with -Z macro-backtrace for more info)
1616

1717
error[E0080]: evaluation of constant value failed
1818
--> $DIR/const_panic_libcore_bin.rs:14:15
1919
|
2020
LL | const X: () = unimplemented!();
21-
| ^^^^^^^^^^^^^^^^ not implemented
21+
| ^^^^^^^^^^^^^^^^ evaluation panicked: not implemented
2222
|
2323
= note: this error originates in the macro `unimplemented` (in Nightly builds, run with -Z macro-backtrace for more info)
2424

tests/ui/consts/const-eval/const_panic_track_caller.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0080]: evaluation of constant value failed
22
--> $DIR/const_panic_track_caller.rs:19:16
33
|
44
LL | const X: u32 = c();
5-
| ^^^ panic: hey
5+
| ^^^ evaluation panicked: hey
66
|
77
note: inside `c`
88
--> $DIR/const_panic_track_caller.rs:15:5

tests/ui/consts/const-eval/panic-assoc-never-type.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0080]: evaluation of constant value failed
22
--> $DIR/panic-assoc-never-type.rs:9:21
33
|
44
LL | const VOID: ! = panic!();
5-
| ^^^^^^^^ explicit panic
5+
| ^^^^^^^^ evaluation panicked: explicit panic
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

0 commit comments

Comments
 (0)