]> git.proxmox.com Git - rustc.git/blobdiff - src/test/compile-fail/const-slice-oob.rs
New upstream version 1.12.0+dfsg1
[rustc.git] / src / test / compile-fail / const-slice-oob.rs
index 519c4917c71b34643a3ae27a4bbe550a0e42f497..b1b4bfe2d1c39a1e2a08a9e76117699d1e1d854c 100644 (file)
@@ -9,7 +9,9 @@
 // except according to those terms.
 
 const FOO: &'static[u32] = &[1, 2, 3];
-const BAR: u32 = FOO[5]; //~ ERROR const index-expr is out of bounds
+const BAR: u32 = FOO[5];
+//~^ ERROR constant evaluation error [E0080]
+//~| index out of bounds: the len is 3 but the index is 5
 
 fn main() {
     let _ = BAR;