]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/match-ref-binding-mut-option.rs
Merge commit 'a98e7ab8b94485be6bd03e0c6b8682ecab5b52e6' into clippyup
[rust.git] / src / test / ui / binding / match-ref-binding-mut-option.rs
1 // run-pass
2
3 pub fn main() {
4     let mut v = Some(22);
5     match v {
6       None => {}
7       Some(ref mut p) => { *p += 1; }
8     }
9     assert_eq!(v, Some(23));
10 }