Skip to content

Retain the joined span of type-relative struct paths - #400

Open
charliermarsh wants to merge 1 commit into
charlie/ohm-30-dense-proc-macro-span-handlesfrom
charlie/ohm-30-keep-struct-path-spans
Open

charliermarsh wants to merge 1 commit into
charlie/ohm-30-dense-proc-macro-span-handlesfrom
charlie/ohm-30-keep-struct-path-spans

Conversation

@charliermarsh

@charliermarsh charliermarsh commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

On the first workspace check after uv #19612, this change alone saved 83.16 million rustc instructions in uv-resolver (1.738%). Across all 14 compiler processes, six independently primed comparisons against Ohm −30 saved 0.320–0.331%. The uv library used 0.128% more instructions and uv-cli used 0.167% more at the median. uv edit

Rustc repeatedly joins the type and final segment of a struct path to find its span. We now retain that span when both parts have the same syntax context. Mixed-context paths still consult the metavariable span map. Clippy borrows the underlying path when its lints inspect struct expressions and patterns and when #[clippy::author] generates code for them. Rustc CI now type-checks the bundled Clippy against this HIR on Linux and macOS. Clippy companion

With the full −31 SDK, four order-balanced replays of that edit used 1.88% fewer instructions in uv-resolver and 0.15% fewer instructions in the uv library compared with signed −30. Both SDKs rebuilt the same crates and emitted identical struct-pattern diagnostics. Packaged SDK replay

@charliermarsh
charliermarsh force-pushed the charlie/ohm-30-keep-struct-path-spans branch from dfd1ad4 to 5e8f539 Compare November 10, 2026 12:03
@charliermarsh
charliermarsh changed the base branch from charlie/pin-components-release-30 to charlie/ohm-30-dense-proc-macro-span-handles November 10, 2026 12:04
@charliermarsh
charliermarsh force-pushed the charlie/ohm-30-keep-struct-path-spans branch from 5e8f539 to 0578e8f Compare November 10, 2026 12:09
@charliermarsh
charliermarsh marked this pull request as ready for review November 10, 2026 12:14
@charliermarsh
charliermarsh added this pull request to stack #395 November 10, 2026 12:15
@charliermarsh
charliermarsh force-pushed the charlie/ohm-30-keep-struct-path-spans branch 3 times, most recently from 9956416 to ec60095 Compare November 10, 2026 13:02
charliermarsh added a commit to astral-experiments/ohm that referenced this pull request Nov 10, 2026
## Summary

Ohm 1.99.0-31 lets optimized Rust libraries reuse a checked LLVM object
before optimization. LLVM can also reuse an object after bounded source
edits when every observed line has an unambiguous destination. These
paths target incremental O1 builds on x86-64 Linux. [LLVM
stack](astral-experiments/ohm-llvm#22) · [Rust
compiler
change](astral-experiments/ohm-rust#397)

Rustc preserves caller locations across worktrees, indexes consecutive
procedural-macro spans directly, and retains the joined span of
type-relative struct paths. Clippy uses those paths when checking
patterns and expressions. [Rust span
changes](astral-experiments/ohm-rust#400) ·
[Clippy
companion](astral-experiments/ohm-rust-clippy#83)

Cargo documents libraries with names up to 242 bytes and retains active
shared builds whose compiler or driver path contains non-UTF-8 bytes.
Its checked-in lockfile also matches dependency resolution in a
read-only checkout. [Cargo
stack](astral-experiments/ohm-cargo#530)
@charliermarsh
charliermarsh removed this pull request from stack #395 November 12, 2026 17:29
@charliermarsh
charliermarsh added this pull request to stack #413 November 12, 2026 17:29
@charliermarsh
charliermarsh force-pushed the charlie/ohm-30-keep-struct-path-spans branch from ec60095 to 28729f5 Compare November 17, 2026 07:32
@charliermarsh
charliermarsh removed this pull request from stack #413 November 17, 2026 07:33
@charliermarsh
charliermarsh added this pull request to stack #426 November 17, 2026 07:33
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