rust/tests/ui/consts/const-eval/stable-metric/ctfe-fn-call.rs

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

37 lines
424 B
Rust
Raw Normal View History

//@ check-fail
//@ compile-flags: -Z tiny-const-eval-limit
2022-12-28 21:38:34 -06:00
const fn foo() {}
const fn call_foo() -> u32 {
foo();
foo();
foo();
foo();
foo();
2022-12-28 21:38:34 -06:00
foo();
foo();
foo();
foo();
foo();
2022-12-28 21:38:34 -06:00
foo();
foo();
foo();
foo();
foo();
2022-12-28 21:38:34 -06:00
foo();
foo();
foo();
foo(); //~ ERROR is taking a long time
2022-12-28 21:38:34 -06:00
0
}
const X: u32 = call_foo();
fn main() {
println!("{X}");
}