about summary refs log tree commit diff
path: root/tests/ui/static/static-mut-foreign-requires-unsafe.rs
blob: 90aa2537a82bb8add04bcfdb5cc46e0ccc17c5cc (plain)
1
2
3
4
5
6
7
8
9
extern "C" {
    static mut a: i32;
}

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