summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-27842.rs
blob: 3bcfa13307018bcaea59721b0487adc4007a57e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
fn main() {
    let tup = (0, 1, 2);
    // the case where we show a suggestion
    let _ = tup[0];
    //~^ ERROR cannot index into a value of type

    // the case where we show just a general hint
    let i = 0_usize;
    let _ = tup[i];
    //~^ ERROR cannot index into a value of type
}