]> git.lizzy.rs Git - rust.git/blob - src/test/ui/did_you_mean/issue-34337.rs
Test `expect` with `forbid` and fix doc errors (RFC-2383)
[rust.git] / src / test / ui / did_you_mean / issue-34337.rs
1 fn get(key: &mut String) { }
2
3 fn main() {
4     let mut v: Vec<String> = Vec::new();
5     let ref mut key = v[0];
6     get(&mut key); //~ ERROR cannot borrow
7     //~| HELP try removing `&mut` here
8 }