Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
pattern
/
usefulness
/
struct-like-enum-nonexhaustive.rs
blob: b1fc0f5ad3e1478989e983728df273d6a8404964 [
file
] [
log
] [
blame
] [
edit
]
enum
A
{
B
{
x
:
Option
<
isize
>
},
C
}
fn
main
()
{
let
x
=
A
::
B
{
x
:
Some
(
3
)
};
match
x
{
//~ ERROR non-exhaustive patterns
A
::
C
=>
{}
A
::
B
{
x
:
None
}
=>
{}
}
}