error[E0499]: cannot borrow `name` as mutable more than once at a time
--> prog.rs:4:12
|
3 | let r1 = &mut name;
| --------- first mutable borrow occurs here
4 | let r2 = &mut name;
| ^^^^^^^^^ second mutable borrow occurs here
5 | r1.push_str(" Doe");
| -- first borrow later used here
error: aborting due to previous error
For more information about this error, try `rustc --explain E0499`.