rust/src/test/ui/issues/issue-33819.rs
2019-04-22 08:40:08 +01:00

9 lines
207 B
Rust

fn main() {
let mut op = Some(2);
match op {
Some(ref v) => { let a = &mut v; },
//~^ ERROR cannot borrow `v` as mutable, as it is not declared as mutable
None => {},
}
}