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