blob: 9355c8ab15256f7e993d81e57b4a7ea1e77b3faa (
plain)
1
2
3
4
5
6
7
8
9
10
|
const C1: &'static mut [usize] = &mut [];
//~^ ERROR: references in constants may only refer to immutable values
static mut S: usize = 3;
const C2: &'static mut usize = unsafe { &mut S };
//~^ ERROR: constants cannot refer to statics
//~| ERROR: constants cannot refer to statics
//~| ERROR: references in constants may only refer to immutable values
fn main() {}
|