]> git.lizzy.rs Git - rust.git/blob - src/test/ui/on-unimplemented/slice-index.rs
Add 'src/tools/rustfmt/' from commit '7872306edf2e11a69aaffb9434088fd66b46a863'
[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 }