2021-05-17 00:29:54 +02:00
|
|
|
// revisions: mir thir
|
|
|
|
// [thir]compile-flags: -Z thir-unsafeck
|
|
|
|
|
2020-09-01 17:12:52 -04:00
|
|
|
extern "C" {
|
2017-11-26 10:39:16 -08:00
|
|
|
static mut a: i32;
|
2013-06-21 22:46:27 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2020-09-01 17:12:52 -04:00
|
|
|
a += 3; //~ ERROR: requires unsafe
|
|
|
|
a = 4; //~ ERROR: requires unsafe
|
2013-06-21 22:46:27 -07:00
|
|
|
let _b = a; //~ ERROR: requires unsafe
|
|
|
|
}
|