Sign in
rust
/
miri
/
HEAD
/
.
/
tests
/
fail
/
stacked_borrows
/
static_memory_modification.rs
blob: 84d7878b264e5007c89f1f90963eb8459b066da9 [
file
] [
log
] [
blame
]
static
X
:
usize
=
5
;
#[
allow
(
mutable_transmutes
)]
fn
main
()
{
let
_x
=
unsafe
{
std
::
mem
::
transmute
::<&
usize
,
&
mut
usize
>(&
X
)
//~ ERROR: writing to alloc1 which is read-only
};
}