]> git.proxmox.com Git - rustc.git/blobdiff - src/test/compile-fail/on-unimplemented/slice-index.rs
New upstream version 1.13.0+dfsg1
[rustc.git] / src / test / compile-fail / on-unimplemented / slice-index.rs
index 6a8f9d471e1692254619e788ed400abfec7299a3..5c548b5d5bf20760ad1d3c69f78c1f6da03a12a3 100644 (file)
@@ -18,7 +18,9 @@ use std::ops::Index;
 fn main() {
     let x = &[1, 2, 3] as &[i32];
     x[1i32]; //~ ERROR E0277
+             //~| NOTE trait `[i32]: std::ops::Index<i32>` not satisfied
              //~| NOTE slice indices are of type `usize`
     x[..1i32]; //~ ERROR E0277
+               //~| NOTE trait `[i32]: std::ops::Index<std::ops::RangeTo<i32>>` not satisfied
                //~| NOTE slice indices are of type `usize`
 }