mirror of
https://github.com/rust-lang/rust.git
synced 2025-09-30 00:03:49 +00:00
11 lines
218 B
Rust
11 lines
218 B
Rust
#![allow(static_mut_refs)]
|
|
|
|
static mut STDERR_BUFFER_SPACE: u8 = 0;
|
|
|
|
pub static mut STDERR_BUFFER: () = unsafe {
|
|
*(&mut STDERR_BUFFER_SPACE) = 42;
|
|
//~^ ERROR modifying a static's initial value
|
|
};
|
|
|
|
fn main() {}
|