summaryrefslogtreecommitdiffstats
path: root/src/test/ui/on-unimplemented/slice-index.rs
blob: 758220d3c4ecd028fc9dfcf424094e6efe7b351e (plain)
1
2
3
4
5
6
7
8
9
10
// Test new Index error message for slices

use std::ops::Index;


fn main() {
    let x = &[1, 2, 3] as &[i32];
    x[1i32]; //~ ERROR E0277
    x[..1i32]; //~ ERROR E0277
}