]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/issue-33819.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / 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 }