summaryrefslogtreecommitdiffstats
path: root/tests/ui/infinite/infinite-recursion-const-fn.rs
blob: 4209153116d94a5ae0c1fb22f3b4d7d334c2962a (plain)
1
2
3
4
5
6
7
8
9
10
11
//https://github.com/rust-lang/rust/issues/31364

const fn a() -> usize {
    b() //~ ERROR evaluation of constant value failed [E0080]
}
const fn b() -> usize {
    a()
}
const ARR: [i32; a()] = [5; 6];

fn main() {}