mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
11 lines
246 B
Rust
11 lines
246 B
Rust
// revisions: mir thir
|
|
// [thir]compile-flags: -Z thir-unsafeck
|
|
|
|
static mut a: isize = 3;
|
|
|
|
fn main() {
|
|
a += 3; //~ ERROR: requires unsafe
|
|
a = 4; //~ ERROR: requires unsafe
|
|
let _b = a; //~ ERROR: requires unsafe
|
|
}
|