rust/tests/ui/did_you_mean/issue-34337.rs
2023-01-11 09:32:08 +00:00

9 lines
195 B
Rust

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
}