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

37 lines
444 B
Rust
Raw Normal View History

// check-fail
// compile-flags: -Z tiny-const-eval-limit
2022-12-29 03:38:34 +00:00
const fn foo() {}
const fn call_foo() -> u32 {
foo();
foo();
foo();
foo();
foo();
2022-12-29 03:38:34 +00:00
foo();
foo();
foo();
foo();
foo();
2022-12-29 03:38:34 +00:00
foo();
foo();
foo();
foo();
foo();
2022-12-29 03:38:34 +00:00
foo();
foo();
foo();
foo(); //~ ERROR evaluation of constant value failed [E0080]
2022-12-29 03:38:34 +00:00
0
}
const X: u32 = call_foo();
fn main() {
println!("{X}");
}