2 let mut test = Vec::new();
3 let rofl: &Vec<Vec<i32>> = &mut test;
4 //~^ HELP consider changing this to be a mutable reference
6 //~^ ERROR cannot borrow `*rofl` as mutable, as it is behind a `&` reference
7 //~| NOTE `rofl` is a `&` reference, so the data it refers to cannot be borrowed as mutable
11 //~^ HELP consider changing this to be a mutable reference
13 //~^ ERROR cannot assign to `*r`, which is behind a `&` reference
14 //~| NOTE `r` is a `&` reference, so the data it refers to cannot be written
17 let x: &usize = &mut{0};
18 //~^ HELP consider changing this to be a mutable reference
20 //~^ ERROR cannot assign to `*x`, which is behind a `&` reference
21 //~| NOTE `x` is a `&` reference, so the data it refers to cannot be written
24 let y: &usize = &mut(0);
25 //~^ HELP consider changing this to be a mutable reference
27 //~^ ERROR cannot assign to `*y`, which is behind a `&` reference
28 //~| NOTE `y` is a `&` reference, so the data it refers to cannot be written