]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/match-ref-binding-mut-option.rs
Merge commit '35d9c6bf256968e1b40e0d554607928bdf9cebea' into sync_cg_clif-2022-02-23
[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 }