Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
static
/
static-mut-foreign-requires-unsafe.rs
blob: 90aa2537a82bb8add04bcfdb5cc46e0ccc17c5cc [
file
] [
log
] [
blame
] [
edit
]
extern
"C"
{
static
mut
a
:
i32
;
}
fn
main
()
{
a
+=
3
;
//~ ERROR: requires unsafe
a
=
4
;
//~ ERROR: requires unsafe
let
_b
=
a
;
//~ ERROR: requires unsafe
}