mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
13 lines
238 B
Rust
13 lines
238 B
Rust
// revisions: mir thir
|
|
// [thir]compile-flags: -Z thir-unsafeck
|
|
|
|
extern "C" {
|
|
static mut a: i32;
|
|
}
|
|
|
|
fn main() {
|
|
a += 3; //~ ERROR: requires unsafe
|
|
a = 4; //~ ERROR: requires unsafe
|
|
let _b = a; //~ ERROR: requires unsafe
|
|
}
|