Skip to content

Conversation

@phrwlk
Copy link

@phrwlk phrwlk commented Jan 5, 2026

Describe your changes

BackLink implements PartialEq as always true so that backlink fields are ignored in derived equality and hashing. However,
remove_parent in MIR ops compared BackLink values directly:

self.parents.retain(|p| *p != parent.clone().into());*

Because of the always-true PartialEq, this predicate was always false and effectively cleared the entire parents vector instead of removing only the requested parent.

This change updates all remove_parent implementations for ops that use parents: Vec<BackLink> to compare against the upgraded Link via to_link(), keeping BackLink’s structural Eq/Hash semantics intact while making parent removal semantically correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant