Sign in
fuchsia
/
third_party
/
rust
/
9d09331e00b02f81c714b0c41ce3a38380dd36a2
/
.
/
src
/
test
/
ui
/
consts
/
transmute-const.rs
blob: 5044d99ec51834b55437d303ba207b5af3ad95eb [
file
] [
log
] [
blame
]
// run-pass
use
std
::
mem
;
#[
repr
(
transparent
)]
struct
Foo
(
u32
);
const
TRANSMUTED_U32
:
u32
=
unsafe
{
mem
::
transmute
(
Foo
(
3
))
};
fn
main
()
{
assert_eq
!(
TRANSMUTED_U32
,
3
);
}