error[E07003]: invalid operation, could create dangling a reference ┌─ tests/move_check/borrows/mutate_field_invalid.move:11:9 │ 10 │ let f = &s.f; │ ---- Field 'f' is still being borrowed by this reference 11 │ *s = S { f: 0, g: 0 }; │ ^^^^^^^^^^^^^^^^^^^^^ Invalid mutation of reference. error[E07003]: invalid operation, could create dangling a reference ┌─ tests/move_check/borrows/mutate_field_invalid.move:15:9 │ 14 │ let f = &mut s.f; │ -------- Field 'f' is still being mutably borrowed by this reference 15 │ *s = S { f: 0, g: 0 }; │ ^^^^^^^^^^^^^^^^^^^^^ Invalid mutation of reference. error[E07003]: invalid operation, could create dangling a reference ┌─ tests/move_check/borrows/mutate_field_invalid.move:19:9 │ 18 │ let f = id(&s.f); │ -------- Field 'f' is still being borrowed by this reference 19 │ *s = S { f: 0, g: 0 }; │ ^^^^^^^^^^^^^^^^^^^^^ Invalid mutation of reference. error[E07003]: invalid operation, could create dangling a reference ┌─ tests/move_check/borrows/mutate_field_invalid.move:23:9 │ 22 │ let f = id_mut(&mut s.f); │ ---------------- Field 'f' is still being mutably borrowed by this reference 23 │ *s = S { f: 0, g: 0 }; │ ^^^^^^^^^^^^^^^^^^^^^ Invalid mutation of reference.