@@ -793,9 +793,13 @@ fn diff_non_keyed_children(
793793
794794 for (i, (new_child, old_child)) in new.iter().zip(old.iter()).enumerate() {
795795 if i == 0 {
796+ // [... parent]
796797 change_list.push_first_child();
798+ // [... parent first_child]
797799 } else {
800+ // [... parent prev_sibling]
798801 change_list.pop_push_next_sibling();
802+ // [... parent next_sibling]
799803 }
800804
801805 diff(
@@ -808,13 +812,23 @@ fn diff_non_keyed_children(
808812 );
809813 }
810814
815+ // Note that because `new` and `old` are not empty, the previous loop always
816+ // executes at least once, so the change list stack is now:
817+ //
818+ // [... parent child]
819+
811820 match old.len().cmp(&new.len()) {
812821 Ordering::Greater => {
822+ // [... parent last_shared_child]
813823 change_list.pop_push_next_sibling();
824+ // [... parent first_child_to_remove]
814825 remove_self_and_next_siblings(change_list, registry, &old[new.len()..]);
826+ // [... parent]
815827 }
816828 Ordering::Less => {
829+ // [... parent last_child]
817830 change_list.pop();
831+ // [... parent]
818832 create_and_append_children(
819833 cached_set,
820834 change_list,
@@ -824,7 +838,9 @@ fn diff_non_keyed_children(
824838 );
825839 }
826840 Ordering::Equal => {
841+ // [... parent child]
827842 change_list.pop();
843+ // [... parent]
828844 }
829845 }
830846}