Sign in
android
/
toolchain
/
rustc
/
ee32a8b31351dab7161ea2edd877e46fc49c72d0
/
.
/
tests
/
ui
/
unsafe
/
union_access_through_block.rs
blob: 8b28c33650e5d593dbf6b3582013928c8023d665 [
file
] [
log
] [
blame
]
// check-pass
#[
derive
(
Copy
,
Clone
)]
pub
struct
Foo
{
a
:
bool
}
pub
union
Bar
{
a
:
Foo
,
b
:
u32
,
}
pub
fn
baz
(
mut
bar
:
Bar
)
{
unsafe
{
{
bar
.
a
}.
a
=
true
;
}
}
fn
main
()
{}