]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/match-ref-binding-mut-option.rs
Rollup merge of #104822 - spastorino:selctx-new-instead-of-with_query_mode, r=lcnr
[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 }