error[E07003]: invalid operation, could create dangling a reference ┌─ tests/move_check/borrows/borrow_local_field_invalid.move:14:9 │ 12 │ let f = &v.f; │ ---- Field 'f' is still being borrowed by this reference 13 │ let s = &mut v; 14 │ *s = S { f: 0, g: 0 }; │ ^^^^^^^^^^^^^^^^^^^^^ Invalid mutation of reference. error[E07001]: referential transparency violated ┌─ tests/move_check/borrows/borrow_local_field_invalid.move:19:17 │ 18 │ let f = &mut v.f; │ -------- It is still being mutably borrowed by this reference 19 │ let s = &v; │ ^^ Invalid borrow of variable 'v'