rustc/tests/ui/static/static-mut-foreign-requires-unsafe.rs
2024-06-19 10:24:51 +02:00

10 lines
173 B
Rust

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