]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/match-ref-binding-mut-option.rs
Merge commit 'dbee13661efa269cb4cd57bb4c6b99a19732b484' into sync_cg_clif-2020-12-27
[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 }