Sign in
android
/
toolchain
/
rustc
/
2f3fdfeb95384b9046ea35b3532e23c652eca660
/
.
/
src
/
tools
/
miri
/
tests
/
compile-fail
/
never_transmute_humans.rs
blob: 8a7d7bfcc682a742957c4b024a72e652278b131a [
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 transmuting to uninhabited
};
}