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