Sign in
fuchsia
/
third_party
/
rust
/
ef5f929471c7b9769aac4d3e4aae5deeb7acaa3c
/
.
/
src
/
test
/
ui
/
union
/
union-inherent-method.rs
blob: 2e75cce7b108be3955582b0aeb98b4c51b0811ac [
file
] [
log
] [
blame
]
// run-pass
union U
{
a
:
u8
,
}
impl
U
{
fn
method
(&
self
)
->
u8
{
unsafe
{
self
.
a
}
}
}
fn
main
()
{
let
u
=
U
{
a
:
10
};
assert_eq
!(
u
.
method
(),
10
);
}