Sign in
fuchsia
/
third_party
/
rust
/
0.8
/
.
/
src
/
test
/
run-pass
/
guards-not-exhaustive.rs
blob: 4d30fbe15591a629a3d3f38b49d6fe495e102e18 [
file
]
enum
Q
{
R
(
Option
<
uint
>)
}
fn
xyzzy
(
q
:
Q
)
->
uint
{
match
q
{
R
(
S
)
if
S
.
is_some
()
=>
{
0
}
_
=>
1
}
}
pub
fn
main
()
{
assert_eq
!(
xyzzy
(
R
(
Some
(
5
))),
0
);
}