summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-53712.rs
blob: 2353904d79d75fadba09cf96e8f82b0d76f53606 (plain)
1
2
3
4
5
6
7
8
9
// 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]
}