]> git.lizzy.rs Git - rust.git/blob - src/test/ui/on-unimplemented/slice-index.rs
Merge commit 'b71f3405606d49b9735606b479c3415a0ca9810f' into clippyup
[rust.git] / src / test / ui / on-unimplemented / slice-index.rs
1 // Test new Index error message for slices
2
3 use std::ops::Index;
4
5
6 fn main() {
7     let x = &[1, 2, 3] as &[i32];
8     x[1i32]; //~ ERROR E0277
9     x[..1i32]; //~ ERROR E0277
10 }