2022-12-29 17:14:29 -06:00
|
|
|
// 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-29 17:14:29 -06:00
|
|
|
|
2022-12-28 21:38:34 -06:00
|
|
|
foo();
|
|
|
|
foo();
|
|
|
|
foo();
|
|
|
|
foo();
|
|
|
|
foo();
|
2022-12-29 17:14:29 -06:00
|
|
|
|
2022-12-28 21:38:34 -06:00
|
|
|
foo();
|
|
|
|
foo();
|
|
|
|
foo();
|
|
|
|
foo();
|
|
|
|
foo();
|
2022-12-29 17:14:29 -06:00
|
|
|
|
2022-12-28 21:38:34 -06:00
|
|
|
foo();
|
|
|
|
foo();
|
|
|
|
foo();
|
2022-11-02 06:57:40 -05:00
|
|
|
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}");
|
|
|
|
}
|