blob: 5e2584a6e951a9d831a3257b54b9b9981c49290f [file] [log] [blame]
// revisions: stock mut_refs
#![cfg_attr(mut_refs, feature(const_mut_refs))]
use std::cell::Cell;
const FOO: &u32 = {
let mut a = 42;
{
let b: *mut u32 = &mut a; //~ ERROR mutable references are not allowed in constants
unsafe { *b = 5; } //~ ERROR dereferencing raw pointers in constants
}
&{a}
};
fn main() {}