blob: 4e7c290fa2a0200602b2c975adac7696537b4ce6 (
plain)
1
2
3
4
5
6
7
8
|
#[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 }];
}
|