Sign in
rust
/
miri
/
refs/heads/rustc_doublecheck
/
.
/
tests
/
fail
/
validity
/
dangling_ref1.rs
blob: fc3a9f344638f96d07fe6688bb5a040de653d95a [
file
] [
log
] [
blame
] [
edit
]
// Make sure we catch this even without Stacked Borrows
//@compile-flags: -Zmiri-disable-stacked-borrows
use
std
::
mem
;
fn
main
()
{
let
_x
:
&
i32
=
unsafe
{
mem
::
transmute
(
16usize
)
};
//~ ERROR: encountered a dangling reference
}