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