rust/src/test/compile-fail/issue-33819.rs

10 lines
218 B
Rust
Raw Normal View History

2016-05-23 13:48:11 -05:00
fn main() {
let mut op = Some(2);
match op {
Some(ref v) => { let a = &mut v; },
//~^ ERROR:cannot borrow immutable
//~| use `ref mut v` here to make mutable
None => {},
}
}