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