]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/consts/const-eval/dangling.rs
New upstream version 1.51.0+dfsg1
[rustc.git] / src / test / ui / consts / const-eval / dangling.rs
index 72e97c03220fc91dd10337d8c26dfef51e843303..185d11605fdb589c91b5680fd21a4c4690803a9f 100644 (file)
@@ -6,8 +6,10 @@ use std::mem;
 const TEST: () = { unsafe { //~ NOTE
     let slice: *const [u8] = mem::transmute((1usize, usize::MAX));
     let _val = &*slice; //~ ERROR: any use of this value will cause an error
-    //~^ NOTE: slice is bigger than largest supported object
-    //~^^ on by default
+    //~| NOTE: slice is bigger than largest supported object
+    //~| on by default
+    //~| WARN this was previously accepted by the compiler but is being phased out
+    //~| NOTE
 } };
 
 fn main() {}