2022-12-29 23:14:29 +00:00
|
|
|
// check-fail
|
|
|
|
// compile-flags: -Z tiny-const-eval-limit
|
2022-12-20 00:51:17 +00:00
|
|
|
|
2022-11-02 11:57:40 +00:00
|
|
|
#[rustfmt::skip]
|
2022-12-20 00:51:17 +00:00
|
|
|
const fn recurse(n: u32) -> u32 {
|
|
|
|
if n == 0 {
|
|
|
|
n
|
|
|
|
} else {
|
2022-11-02 11:57:40 +00:00
|
|
|
recurse(n - 1) //~ ERROR is taking a long time
|
2022-12-20 00:51:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-12-29 23:14:29 +00:00
|
|
|
const X: u32 = recurse(19);
|
2022-12-20 00:51:17 +00:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
println!("{X}");
|
|
|
|
}
|