]> git.lizzy.rs Git - rust.git/blob - src/test/ui/on-unimplemented/slice-index.rs
Auto merge of #56951 - oli-obk:auto_toolstate_issue, r=kennytm
[rust.git] / src / test / ui / on-unimplemented / slice-index.rs
1 // Test new Index error message for slices
2 // ignore-tidy-linelength
3
4
5
6 use std::ops::Index;
7
8
9 fn main() {
10     let x = &[1, 2, 3] as &[i32];
11     x[1i32]; //~ ERROR E0277
12     x[..1i32]; //~ ERROR E0277
13 }