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

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

fn main(){}