blob: 644748786036d0b41f3e0981596ba2d0fa975d51 [file] [log] [blame]
#![feature(const_fn)]
const X : usize = 2;
const fn f(x: usize) -> usize {
let mut sum = 0;
for i in 0..x {
//~^ ERROR mutable references
//~| ERROR E0080
//~| ERROR E0744
sum += i;
}
sum
}
#[allow(unused_variables)]
fn main() {
let a : [i32; f(X)];
}