error[E07003]: invalid operation, could create dangling a reference ┌─ tests/move_check/borrows/mutate_combo_invalid.move:14:9 │ 13 │ if (cond) f = &s.f else f = &s.g; │ ---- ---- Field 'g' is still being borrowed by this reference │ │ │ Field 'f' is still being borrowed by this reference 14 │ *s = S { f: 0, g: 0 }; │ ^^^^^^^^^^^^^^^^^^^^^ Invalid mutation of reference. error[E07003]: invalid operation, could create dangling a reference ┌─ tests/move_check/borrows/mutate_combo_invalid.move:23:9 │ 22 │ if (cond) f = &mut s.f else f = &mut other.f; │ -------- Field 'f' is still being mutably borrowed by this reference 23 │ *s = S { f: 0, g: 0 }; │ ^^^^^^^^^^^^^^^^^^^^^ Invalid mutation of reference. error[E07003]: invalid operation, could create dangling a reference ┌─ tests/move_check/borrows/mutate_combo_invalid.move:32:9 │ 31 │ if (cond) f = s else f = other; │ - It is still being mutably borrowed by this reference 32 │ *s = S { f: 0, g: 0 }; │ ^^^^^^^^^^^^^^^^^^^^^ Invalid mutation of reference. error[E07003]: invalid operation, could create dangling a reference ┌─ tests/move_check/borrows/mutate_combo_invalid.move:41:9 │ 40 │ if (cond) f = id_mut(s) else f = other; │ --------- It is still being mutably borrowed by this reference 41 │ *s = S { f: 0, g: 0 }; │ ^^^^^^^^^^^^^^^^^^^^^ Invalid mutation of reference. error[E07003]: invalid operation, could create dangling a reference ┌─ tests/move_check/borrows/mutate_combo_invalid.move:49:19 │ 48 │ let f = &s.f; │ ---- Field 'f' is still being borrowed by this reference 49 │ if (cond) *s = S { f: 0, g: 0 }; │ ^^^^^^^^^^^^^^^^^^^^^ Invalid mutation of reference.