Regression of panic message in const context since 1.89?
⚓ Rust 📅 2025-08-18 👤 surdeus 👁️ 13Since rust 1.89 the message when the code panic in a const context is no more displayed.
Consider the following code:
fn main() {
const _: () = assert!(false, "this assert fails");
}
In 1.88:
error[E0080]: evaluation of constant value failed
--> src\main.rs:2:19
|
2 | const _: () = assert!(false, "this assert fails");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: this assert fails
For more information about this error, try `rustc --explain E0080`.
In 1.89:
error[E0080]: evaluation panicked: this assert fails
--> src\main.rs:2:19
|
2 | const _: () = assert!(false, "this assert fails");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `main::_` failed here
For more information about this error, try `rustc --explain E0080`.
Did I miss this point in the changelog?
3 posts - 2 participants
🏷️ Rust_feed