summary refs log tree commit diff
path: root/src/test/ui/infinite/infinite-recursion-const-fn.rs
blob: 34580407926f18cf12d650e378efd406b903b2d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//https://github.com/rust-lang/rust/issues/31364

const fn a() -> usize {
    //~^ ERROR cycle detected when const-evaluating + checking `a` [E0391]
    b()
}
const fn b() -> usize {
    a()
}
const ARR: [i32; a()] = [5; 6];

fn main() {}