2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2015-03-22 15:13:15 -05:00
|
|
|
|
2013-02-01 21:43:17 -06:00
|
|
|
pub fn main() {
|
2015-01-25 15:05:03 -06:00
|
|
|
let mut v = Some(22);
|
2012-08-07 08:04:36 -05:00
|
|
|
match v {
|
2012-08-20 14:23:37 -05:00
|
|
|
None => {}
|
|
|
|
Some(ref mut p) => { *p += 1; }
|
2012-08-07 08:04:36 -05:00
|
|
|
}
|
2013-05-18 21:02:45 -05:00
|
|
|
assert_eq!(v, Some(23));
|
2012-08-07 08:04:36 -05:00
|
|
|
}
|