mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 06:22:00 +00:00
8 lines
191 B
Rust
8 lines
191 B
Rust
// run-rustfix
|
|
#![allow(unused_variables)]
|
|
|
|
fn main() {
|
|
let i: &usize = &1;
|
|
let one_item_please: i32 = [1, 2, 3][*i]; //~ ERROR the type `[{integer}]` cannot be indexed by `&usize`
|
|
}
|