Skip to content

Keep import definition IDs stable when a sibling import moves - #434

Open
charliermarsh wants to merge 1 commit into
charlie/recover-closure-impl-lookupsfrom
charlie/ohm-100-stable-imports
Open

charliermarsh wants to merge 1 commit into
charlie/recover-closure-impl-lookupsfrom
charlie/ohm-100-stable-imports

Conversation

@charliermarsh

@charliermarsh charliermarsh commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Deleting use std::slice; from uv-lock renumbers a later use itertools::Itertools;. Every body that considered that trait during method resolution then has a different fingerprint. We now number imports with the same final path segment together, including inside grouped imports. Removing slice preserves the identity of Itertools. Switching to a different trait with the same name still invalidates the caller when its resolution changes.

In six pairs against the −2 compiler source, the first check after the edit used 28.70% fewer instructions in uv-lock and 8.89–8.91% fewer across all 18 rustc processes. The number of bodies borrow-checked in uv-lock fell from 101 to 18. uv edit

@charliermarsh
charliermarsh force-pushed the charlie/ohm-100-stable-imports branch from 2f008a6 to 3f82799 Compare November 20, 2026 00:41
@charliermarsh
charliermarsh changed the base branch from charlie/pin-cargo-1.100.0-2 to charlie/recover-closure-impl-lookups November 20, 2026 00:44
@charliermarsh
charliermarsh added this pull request to stack #427 November 20, 2026 00:45
@charliermarsh
charliermarsh marked this pull request as ready for review November 20, 2026 00:47
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