Sign in
android
/
toolchain
/
rustc
/
d720b3f2ba07cb42ff7b311589c99daefe3aaa22
/
.
/
tests
/
ui
/
consts
/
transmute-const.rs
blob: c5c3dfc4cc7bda06fed3c71c41b2289b60d3833f [
file
] [
log
] [
blame
]
// run-pass
use
std
::
mem
;
#[
repr
(
transparent
)]
struct
Foo
(#[
allow
(
unused_tuple_struct_fields
)]
u32
);
const
TRANSMUTED_U32
:
u32
=
unsafe
{
mem
::
transmute
(
Foo
(
3
))
};
fn
main
()
{
assert_eq
!(
TRANSMUTED_U32
,
3
);
}