rust/src/test/ui/static/static-mut-foreign-requires-unsafe.rs
2018-12-25 21:08:33 -07:00

10 lines
178 B
Rust

extern {
static mut a: i32;
}
fn main() {
a += 3; //~ ERROR: requires unsafe
a = 4; //~ ERROR: requires unsafe
let _b = a; //~ ERROR: requires unsafe
}