]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/consts/const-address-of-mut.rs
New upstream version 1.49.0~beta.4+dfsg1
[rustc.git] / src / test / ui / consts / const-address-of-mut.rs
index fe9188cb4904c99eed1022964c1a10a62467024d..3788088b810b9e51e6ae444d0e470a63a3c55a5c 100644 (file)
@@ -1,14 +1,14 @@
 #![feature(raw_ref_op)]
 
-const A: () = { let mut x = 2; &raw mut x; };           //~ ERROR `&raw mut` is not allowed
+const A: () = { let mut x = 2; &raw mut x; };           //~ mutable reference
 
-static B: () = { let mut x = 2; &raw mut x; };          //~ ERROR `&raw mut` is not allowed
+static B: () = { let mut x = 2; &raw mut x; };          //~ mutable reference
 
-static mut C: () = { let mut x = 2; &raw mut x; };      //~ ERROR `&raw mut` is not allowed
+static mut C: () = { let mut x = 2; &raw mut x; };      //~ mutable reference
 
 const fn foo() {
     let mut x = 0;
-    let y = &raw mut x;                                 //~ ERROR `&raw mut` is not allowed
+    let y = &raw mut x;                                 //~ mutable reference
 }
 
 fn main() {}