]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/issue-33819.rs
Merge commit '1411a98352ba6bee8ba3b0131c9243e5db1e6a2e' into sync_cg_clif-2021-12-31
[rust.git] / src / test / ui / borrowck / issue-33819.rs
1 fn main() {
2     let mut op = Some(2);
3     match op {
4         Some(ref v) => { let a = &mut v; },
5         //~^ ERROR cannot borrow `v` as mutable, as it is not declared as mutable
6         //~| HELP try removing `&mut` here
7         None => {},
8     }
9 }