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