rust/tests/ui/consts/static_mut_containing_mut_ref2.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
221 B
Rust
Raw Normal View History

#![allow(static_mut_refs)]
2019-11-28 11:57:34 -05:00
2018-12-17 14:20:42 +01:00
static mut STDERR_BUFFER_SPACE: u8 = 0;
pub static mut STDERR_BUFFER: () = unsafe {
*(&mut STDERR_BUFFER_SPACE) = 42;
2024-08-17 14:19:34 +02:00
//~^ ERROR could not evaluate static initializer
};
2018-12-17 14:20:42 +01:00
fn main() {}