2016-05-23 13:48:11 -05:00
|
|
|
fn main() {
|
|
|
|
let mut op = Some(2);
|
|
|
|
match op {
|
|
|
|
Some(ref v) => { let a = &mut v; },
|
2019-04-22 02:40:08 -05:00
|
|
|
//~^ ERROR cannot borrow `v` as mutable, as it is not declared as mutable
|
2021-07-25 09:56:13 -05:00
|
|
|
//~| HELP try removing `&mut` here
|
2016-05-23 13:48:11 -05:00
|
|
|
None => {},
|
|
|
|
}
|
|
|
|
}
|