Sign in
android
/
toolchain
/
rustc
/
2f3fdfeb95384b9046ea35b3532e23c652eca660
/
.
/
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
}