mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
9 lines
269 B
Rust
9 lines
269 B
Rust
#[deny(unused)]
|
|
fn main() {
|
|
let arr = [0; 10];
|
|
let _ = arr[(0)]; //~ ERROR unnecessary parentheses around index expression
|
|
let _ = arr[{0}]; //~ ERROR unnecessary braces around index expression
|
|
let _ = arr[1 + (0)];
|
|
let _ = arr[{ let x = 0; x }];
|
|
}
|