rust/tests/ui/infinite/infinite-recursion-const-fn.rs

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

12 lines
218 B
Rust
Raw Normal View History

2018-01-16 10:15:41 +01:00
//https://github.com/rust-lang/rust/issues/31364
2020-09-07 17:30:38 +02:00
const fn a() -> usize {
b() //~ ERROR evaluation of constant value failed [E0080]
2020-09-07 17:30:38 +02:00
}
const fn b() -> usize {
a()
}
const ARR: [i32; a()] = [5; 6];
2018-01-16 10:15:41 +01:00
2020-09-07 17:30:38 +02:00
fn main() {}