Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
pretty
/
postfix-match
/
simple-matches.rs
blob: 5bb54e15275ba051d04c5aeaddbb27a4a6498271 [
file
] [
log
] [
blame
] [
edit
]
#![
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
{
_
=>
(),
}
}