rust/tests/ui/explicit-tail-calls/ctfe-tail-call-panic.rs
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

17 lines
289 B
Rust

#![expect(incomplete_features)]
#![feature(explicit_tail_calls)]
pub const fn f() {
become g();
}
const fn g() {
panic!() //~ NOTE inside `g`
//~^ NOTE in this expansion of panic!
}
const _: () = f(); //~ NOTE failed inside this call
//~^ ERROR explicit panic
fn main() {}