rust/tests/ui/explicit-tail-calls/ctfe-tail-call-panic.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
353 B
Rust
Raw Normal View History

2023-06-28 15:34:10 +00:00
#![allow(incomplete_features)]
#![feature(explicit_tail_calls)]
pub const fn f() {
become g();
}
const fn g() {
panic!()
//~^ error: evaluation of constant value failed
//~| note: in this expansion of panic!
//~| note: inside `g`
//~| note: in this expansion of panic!
}
const _: () = f();
//~^ note: inside `_`
fn main() {}