rust/src/test/ui/infinite/infinite-recursion-const-fn.rs

8 lines
214 B
Rust
Raw Normal View History

2018-01-16 03:15:41 -06:00
//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];
2018-01-16 03:15:41 -06:00
fn main(){}