]> git.lizzy.rs Git - rust.git/blob - src/test/ui/on-unimplemented/slice-index.rs
Merge commit 'c1664c50b27a51f7a78c93ba65558e7c33eabee6' 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 }