mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
10 lines
308 B
Rust
10 lines
308 B
Rust
// issue #53712: make the error generated by using tuple indexing on an array more specific
|
|
|
|
fn main() {
|
|
let arr = [10, 20, 30, 40, 50];
|
|
arr.0;
|
|
//~^ ERROR no field `0` on type `[{integer}; 5]` [E0609]
|
|
//~| HELP instead of using tuple indexing, use array indexing
|
|
//~| SUGGESTION arr[0]
|
|
}
|