Sign in
rust
/
rust-lang
/
rust
/
HEAD
/
.
/
src
/
tools
/
rustfmt
/
tests
/
source
/
postfix-match
/
pf-match.rs
blob: b2366723631edd1e045f866b339df08cb77716fd [
file
] [
log
] [
blame
]
#![
feature
(
postfix_match
)]
fn
main
()
{
let
val
=
Some
(
42
);
val
.
match
{
Some
(
_
)
=>
2
,
_
=>
1
};
Some
(
2
).
match
{
Some
(
_
)
=>
true
,
None
=>
false
}.
match
{
false
=>
"ferris is cute"
,
true
=>
"I turn cats in to petted cats"
,
}.
match
{
_
=>
(),
}
}