fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1// run-rustfix 2#![allow(unused_variables, dead_code, non_upper_case_globals)] 3 4fn main() { 5 const Foo: [i32; 3] = [1, 2, 3]; 6 //~^ ERROR in expressions, `_` can only be used on the left-hand side of an assignment 7 //~| ERROR using `_` for array lengths is unstable 8 const REF_FOO: &[u8; 1] = &[1]; 9 //~^ ERROR in expressions, `_` can only be used on the left-hand side of an assignment 10 //~| ERROR using `_` for array lengths is unstable 11 let foo: [i32; 3] = [1, 2, 3]; 12 //~^ ERROR in expressions, `_` can only be used on the left-hand side of an assignment 13 //~| ERROR using `_` for array lengths is unstable 14 let bar: [i32; 3] = [0; 3]; 15 //~^ ERROR in expressions, `_` can only be used on the left-hand side of an assignment 16 //~| ERROR using `_` for array lengths is unstable 17 let ref_foo: &[i32; 3] = &[1, 2, 3]; 18 //~^ ERROR in expressions, `_` can only be used on the left-hand side of an assignment 19 //~| ERROR using `_` for array lengths is unstable 20 let ref_bar: &[i32; 3] = &[0; 3]; 21 //~^ ERROR in expressions, `_` can only be used on the left-hand side of an assignment 22 //~| ERROR using `_` for array lengths is unstable 23 let multiple_ref_foo: &&[i32; 3] = &&[1, 2, 3]; 24 //~^ ERROR in expressions, `_` can only be used on the left-hand side of an assignment 25 //~| ERROR using `_` for array lengths is unstable 26}