summary refs log tree commit diff
path: root/src/test/ui/consts/const-call.rs
blob: 3d5b64ed4c26fd92807592ac7ccec6fcfc630212 (plain)
1
2
3
4
5
6
7
8
9
fn f(x: usize) -> usize {
    x
}

fn main() {
    let _ = [0; f(2)];
    //~^ ERROR calls in constants are limited to constant functions
    //~| ERROR evaluation of constant value failed
}