rust/tests/ui/consts/const-eval/const_panic.stderr
Ralf Jung 17946c22b1 const-eval error: always say in which item the error occurred
also adjust the wording a little so that we don't say "the error occurred here" for two different spans
2025-06-07 13:42:30 +02:00

80 lines
2.8 KiB
Plaintext

error[E0080]: evaluation panicked: cheese
--> $DIR/const_panic.rs:6:15
|
LL | const Z: () = std::panic!("cheese");
| ^^^^^^^^^^^^^^^^^^^^^ evaluation of `Z` failed here
error[E0080]: evaluation panicked: explicit panic
--> $DIR/const_panic.rs:9:16
|
LL | const Z2: () = std::panic!();
| ^^^^^^^^^^^^^ evaluation of `Z2` failed here
error[E0080]: evaluation panicked: internal error: entered unreachable code
--> $DIR/const_panic.rs:12:15
|
LL | const Y: () = std::unreachable!();
| ^^^^^^^^^^^^^^^^^^^ evaluation of `Y` failed here
error[E0080]: evaluation panicked: not implemented
--> $DIR/const_panic.rs:15:15
|
LL | const X: () = std::unimplemented!();
| ^^^^^^^^^^^^^^^^^^^^^ evaluation of `X` failed here
|
= note: this error originates in the macro `std::unimplemented` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0080]: evaluation panicked: hello
--> $DIR/const_panic.rs:18:15
|
LL | const W: () = std::panic!(MSG);
| ^^^^^^^^^^^^^^^^ evaluation of `W` failed here
error[E0080]: evaluation panicked: hello
--> $DIR/const_panic.rs:21:16
|
LL | const W2: () = std::panic!("{}", MSG);
| ^^^^^^^^^^^^^^^^^^^^^^ evaluation of `W2` failed here
error[E0080]: evaluation panicked: cheese
--> $DIR/const_panic.rs:24:20
|
LL | const Z_CORE: () = core::panic!("cheese");
| ^^^^^^^^^^^^^^^^^^^^^^ evaluation of `Z_CORE` failed here
error[E0080]: evaluation panicked: explicit panic
--> $DIR/const_panic.rs:27:21
|
LL | const Z2_CORE: () = core::panic!();
| ^^^^^^^^^^^^^^ evaluation of `Z2_CORE` failed here
error[E0080]: evaluation panicked: internal error: entered unreachable code
--> $DIR/const_panic.rs:30:20
|
LL | const Y_CORE: () = core::unreachable!();
| ^^^^^^^^^^^^^^^^^^^^ evaluation of `Y_CORE` failed here
error[E0080]: evaluation panicked: not implemented
--> $DIR/const_panic.rs:33:20
|
LL | const X_CORE: () = core::unimplemented!();
| ^^^^^^^^^^^^^^^^^^^^^^ evaluation of `X_CORE` failed here
|
= note: this error originates in the macro `core::unimplemented` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0080]: evaluation panicked: hello
--> $DIR/const_panic.rs:36:20
|
LL | const W_CORE: () = core::panic!(MSG);
| ^^^^^^^^^^^^^^^^^ evaluation of `W_CORE` failed here
error[E0080]: evaluation panicked: hello
--> $DIR/const_panic.rs:39:21
|
LL | const W2_CORE: () = core::panic!("{}", MSG);
| ^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `W2_CORE` failed here
error: aborting due to 12 previous errors
For more information about this error, try `rustc --explain E0080`.