Sign in
android
/
toolchain
/
rustc
/
2f3fdfeb95384b9046ea35b3532e23c652eca660
/
.
/
src
/
test
/
ui
/
union
/
union-lint-dead-code.rs
blob: ae5337c618a754d470c8af176689390c56be7c60 [
file
] [
log
] [
blame
]
#![
deny
(
dead_code
)]
union
Foo
{
x
:
usize
,
b
:
bool
,
//~ ERROR: field is never read
_unused
:
u16
,
}
fn
field_read
(
f
:
Foo
)
->
usize
{
unsafe
{
f
.
x
}
}
fn
main
()
{
let
_
=
field_read
(
Foo
{
x
:
2
});
}