3 // Test that we can't mutate a place if we need to deref an imm-borrow
7 let mut x = String::new();
10 let ref_mref_x = &mref_x;
13 //~^ ERROR: cannot borrow `**ref_mref_x` as mutable, as it is behind a `&` reference
21 let x = String::new();
22 let y = String::new();
24 let mref_ref_x = &mut ref_x;
27 //~^ ERROR: cannot borrow `**mref_ref_x` as mutable, as it is behind a `&` reference