summaryrefslogtreecommitdiffstats
path: root/src/test/ui/did_you_mean/issue-34337.rs
blob: e89eda33f8c931e29abae38b181b0f0f49693fbb (plain)
1
2
3
4
5
6
7
8
fn get(key: &mut String) { }

fn main() {
    let mut v: Vec<String> = Vec::new();
    let ref mut key = v[0];
    get(&mut key); //~ ERROR cannot borrow
    //~| HELP try removing `&mut` here
}