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