Sign in
rust
/
rust-lang
/
rust
/
HEAD
/
.
/
tests
/
ui
/
consts
/
miri_unleashed
/
mutating_global.rs
blob: 9a88f584a58ec0e163b0e92127e909dec4ef2eec [
file
] [
log
] [
blame
]
//@ compile-flags: -Zunleash-the-miri-inside-of-you
// Make sure we cannot mutate globals.
static
mut
GLOBAL
:
i32
=
0
;
static
MUTATING_GLOBAL
:
()
=
{
unsafe
{
GLOBAL
=
99
//~^ ERROR modifying a static's initial value
}
};
fn
main
()
{}