]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/write_to_mut_ref_dest.rs
1 // revisions: stock mut_refs
2 //[mut_refs] check-pass
4 #![cfg_attr(mut_refs, feature(const_mut_refs))]
11 let b
: *mut u32 = &mut a
; //[stock]~ ERROR mutable references are not allowed in constants
12 unsafe { *b = 5; }
//[stock]~ ERROR dereferencing raw mutable pointers in constants