Sign in
rust
/
rust-lang
/
rust
/
HEAD
/
.
/
src
/
tools
/
miri
/
tests
/
fail
/
never_transmute_humans.rs
blob: cba3cc0ccf17b0c5a6953c27d578e9bd43956f30 [
file
] [
log
] [
blame
]
// This should fail even without validation
//@compile-flags: -Zmiri-disable-validation
#![
feature
(
never_type
)]
struct
Human
;
fn
main
()
{
let
_x
:
!
=
unsafe
{
std
::
mem
::
transmute
::<
Human
,
!>(
Human
)
//~ ERROR: entering unreachable code
};
}