1 error[E0499]: cannot borrow `my_struct.field` as mutable more than once at a time (Ast)
2 --> $DIR/return_from_loop.rs:32:9
4 LL | let value = &mut my_struct.field;
5 | --------------- first mutable borrow occurs here
7 LL | my_struct.field.push_str("Hello, world!");
8 | ^^^^^^^^^^^^^^^ second mutable borrow occurs here
11 | - first borrow ends here
13 error[E0499]: cannot borrow `my_struct.field` as mutable more than once at a time (Ast)
14 --> $DIR/return_from_loop.rs:45:9
16 LL | let value = &mut my_struct.field;
17 | --------------- first mutable borrow occurs here
19 LL | my_struct.field.push_str("Hello, world!");
20 | ^^^^^^^^^^^^^^^ second mutable borrow occurs here
23 | - first borrow ends here
25 error[E0499]: cannot borrow `my_struct.field` as mutable more than once at a time (Mir)
26 --> $DIR/return_from_loop.rs:32:9
28 LL | let value = &mut my_struct.field;
29 | -------------------- first mutable borrow occurs here
31 LL | my_struct.field.push_str("Hello, world!");
32 | ^^^^^^^^^^^^^^^ second mutable borrow occurs here
35 | ----- first borrow later used here
37 error: aborting due to 3 previous errors
39 For more information about this error, try `rustc --explain E0499`.