Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
unsafe
/
union_access_through_block.rs
blob: d440e10a20f44fd805fb1b5eac3ddd8db0088c2c [
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
()
{}