Sign in
rust
/
rust-lang
/
rust
/
refs/heads/try
/
.
/
tests
/
ui
/
binding
/
match-ref-binding-mut-option.rs
blob: f500e05c572aafc0a45c37c98bb125733badc089 [
file
] [
log
] [
blame
]
//@ run-pass
pub
fn
main
()
{
let
mut
v
=
Some
(
22
);
match
v
{
None
=>
{}
Some
(
ref
mut
p
)
=>
{
*
p
+=
1
;
}
}
assert_eq
!(
v
,
Some
(
23
));
}