rust/tests/ui/static/static-mut-requires-unsafe.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
246 B
Rust
Raw Normal View History

// revisions: mir thir
// [thir]compile-flags: -Z thir-unsafeck
static mut a: isize = 3;
2013-06-22 01:46:34 +00:00
fn main() {
a += 3; //~ ERROR: requires unsafe
a = 4; //~ ERROR: requires unsafe
let _b = a; //~ ERROR: requires unsafe
}