mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-29 03:27:44 +00:00
15 lines
635 B
Rust
15 lines
635 B
Rust
![]() |
// run-rustfix
|
||
|
#![allow(unused_variables, dead_code, non_upper_case_globals)]
|
||
|
|
||
|
fn main() {
|
||
|
const Foo: [i32; 3] = [1, 2, 3];
|
||
|
//~^ ERROR in expressions, `_` can only be used on the left-hand side of an assignment
|
||
|
//~| ERROR using `_` for array lengths is unstable
|
||
|
let foo: [i32; 3] = [1, 2, 3];
|
||
|
//~^ ERROR in expressions, `_` can only be used on the left-hand side of an assignment
|
||
|
//~| ERROR using `_` for array lengths is unstable
|
||
|
let bar: [i32; 3] = [0; 3];
|
||
|
//~^ ERROR in expressions, `_` can only be used on the left-hand side of an assignment
|
||
|
//~| ERROR using `_` for array lengths is unstable
|
||
|
}
|