2015-01-08 22:02:42 +11:00
|
|
|
const C1: &'static mut [usize] = &mut [];
|
2021-01-03 18:46:20 +00:00
|
|
|
//~^ ERROR: mutable references are not allowed
|
2014-10-06 21:16:35 -07:00
|
|
|
|
2015-01-08 22:02:42 +11:00
|
|
|
static mut S: usize = 3;
|
2016-05-03 01:57:35 +03:00
|
|
|
const C2: &'static mut usize = unsafe { &mut S };
|
|
|
|
//~^ ERROR: constants cannot refer to statics
|
2020-01-08 20:02:10 +03:00
|
|
|
//~| ERROR: constants cannot refer to statics
|
2014-10-06 21:16:35 -07:00
|
|
|
|
|
|
|
fn main() {}
|