]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/projection_qualif.rs
Auto merge of #64546 - weiznich:bugfix/rfc-2451-rerebalance-tests, r=nikomatsakis
[rust.git] / src / test / ui / consts / projection_qualif.rs
1 use std::cell::Cell;
2
3 const FOO: &u32 = {
4     let mut a = 42;
5     {
6         let b: *mut u32 = &mut a; //~ ERROR may only refer to immutable values
7         unsafe { *b = 5; } //~ ERROR dereferencing raw pointers in constants
8         //~^ contains unimplemented expression
9     }
10     &{a}
11 };
12
13 fn main() {}