rust/tests/run-pass/static_memory_modification.rs

9 lines
100 B
Rust

static mut X: usize = 5;
fn main() {
unsafe {
X = 6;
assert_eq!(X, 6);
}
}