mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
9 lines
195 B
Rust
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
|
|
}
|