Sign in
fuchsia
/
third_party
/
rust
/
346aec9b02f3c74f3fce97fd6bda24709d220e49
/
.
/
src
/
test
/
ui
/
consts
/
const-eval
/
write-to-uninhabited-enum-variant.rs
blob: cccb7879fc0fbe5c8d464b46cc3e91bbe7915a4d [
file
] [
log
] [
blame
]
// run-pass
#![
allow
(
dead_code
)]
enum
Empty
{
}
enum
Test1
{
A
(
u8
),
B
(
Empty
),
}
enum
Test2
{
A
(
u8
),
B
(
Empty
),
C
,
}
fn
bar
()
->
Option
<
Empty
>
{
None
}
fn
main
()
{
if
let
Some
(
x
)
=
bar
()
{
Test1
::
B
(
x
);
}
if
let
Some
(
x
)
=
bar
()
{
Test2
::
B
(
x
);
}
}