Sign in
fuchsia
/
third_party
/
rust
/
5a2fceefd312ec027bdeaa89ebefbe4c33d94de1
/
.
/
src
/
tools
/
miri
/
tests
/
fail
/
validity
/
dangling_ref1.rs
blob: fc3a9f344638f96d07fe6688bb5a040de653d95a [
file
] [
log
] [
blame
]
// 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
}