2019-11-28 10:57:34 -06:00
|
|
|
// revisions: stock mut_refs
|
|
|
|
|
|
|
|
#![cfg_attr(mut_refs, feature(const_mut_refs))]
|
|
|
|
|
2018-12-17 07:20:42 -06:00
|
|
|
static mut STDERR_BUFFER_SPACE: u8 = 0;
|
|
|
|
|
|
|
|
pub static mut STDERR_BUFFER: () = unsafe { *(&mut STDERR_BUFFER_SPACE) = 42; };
|
2021-01-03 12:46:20 -06:00
|
|
|
//[mut_refs]~^ ERROR could not evaluate static initializer
|
|
|
|
//[stock]~^^ ERROR mutable references are not allowed in statics
|
2018-12-17 07:20:42 -06:00
|
|
|
|
|
|
|
fn main() {}
|