Sign in
android
/
toolchain
/
rustc
/
89a0a0cd9cbd0a0138a09bd877bbc73859a8c330
/
.
/
src
/
test
/
ui
/
static
/
static-mut-foreign-requires-unsafe.rs
blob: 4f96acb3375b8a433f508d03ba326e34edb2a773 [
file
] [
log
] [
blame
]
// 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
}