Sign in
fuchsia
/
third_party
/
github.com
/
rust-lang
/
rust
/
HEAD
/
.
/
tests
/
ui
/
borrowck
/
borrowck-pat-reassign-no-binding.rs
blob: 656547c976ab0b732f5587037f79c013d5a554b9 [
file
] [
log
] [
blame
]
//@ run-pass
pub
fn
main
()
{
let
mut
x
=
None
;
match
x
{
None
=>
{
// It is ok to reassign x here, because there is in
// fact no outstanding loan of x!
x
=
Some
(
0
);
}
Some
(
_
)
=>
{
}
}
assert_eq
!(
x
,
Some
(
0
));
}