2 // revisions: normal feature
4 #![cfg_attr(feature, feature(generic_arg_infer))]
6 fn foo<const N: usize>(_: [u8; N]) -> [u8; N] {
11 let _x: [u8; 3] = [0; _];
12 //[normal]~^ ERROR: using `_` for array lengths is unstable
13 //[normal]~| ERROR: in expressions, `_` can only be used on the left-hand side of an assignment
14 let _y: [u8; _] = [0; 3];
15 //[normal]~^ ERROR: using `_` for array lengths is unstable
16 //[normal]~| ERROR: in expressions, `_` can only be used on the left-hand side of an assignment
20 let _x = foo::<_>([1,2]);
21 //[normal]~^ ERROR: type provided when a constant was expected