Repository navigation
Defer declaration spans during trait and well-formedness checks - #361
Open
charliermarsh wants to merge 2 commits into
Open
charliermarsh wants to merge 2 commits into
charliermarsh wants to merge 2 commits into
Conversation
This was referenced Nov 6, 2026
charliermarsh
marked this pull request as ready for review
November 6, 2026 14:35
charliermarsh
added a commit
to astral-experiments/ohm
that referenced
this pull request
Nov 6, 2026
## Summary The release-trained compiler stack used 21.89% fewer instructions across all rustc processes in the first edited uv library check than signed Ohm -26, at the median of eight independent confirmation pairs. Every pair exceeded 20%. This pins Ohm 1.99.0-27 to the compiler stack containing [macro expansion anchors](astral-experiments/ohm-rust#360), [the empty impl-directory port](astral-experiments/ohm-rust#362), and [deferred declaration spans](astral-experiments/ohm-rust#361). Cargo, Clippy, rustfmt, and Wild retain their -26 pins. The manifest keeps the existing release PGO/BOLT training and packaging path.
Keep predicates, declaring items and their original indices available to method confirmation and well-formedness checks. Resolve a predicate's current location when constructing a diagnostic or a region error. Adapt the late-bound generics separation from 8325de5 (#138) to the existing v10 metadata encoding. Preserve associated identifier hygiene and look up its source span when a caller needs the location.
charliermarsh
force-pushed
the
charlie/ohm-26-defer-obligation-spans
branch
from
November 17, 2026 07:31
6a6ad1c to
6c98584
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On x86_64 Linux after uv #19612, the release-trained stack through this PR used 21.89% fewer instructions for the first edited library check and 21.70% fewer for the workspace check than signed Ohm -26, at the median of eight independent confirmation pairs per command. All 16 pairs saved more than 20%. uv edit
cargo check -p uv --libcargo checkfrom the workspace rootTwo descriptive pilot pairs per command are recorded separately. These stack comparisons include #360 and the #328 port in #362. In the isolated comparison against that immediate parent, matched stage1 builds used 5.88% fewer instructions in both pairs.
Moving declarations shifted the source locations of bounds even though their meaning stayed the same. Successful downstream type and borrow checks read those locations while confirming methods and proving well-formedness, so they could not reuse their previous results. We now retain the semantic predicates, their declaring item, and their original indices. A diagnostic reads the current source location when it needs it. The
auditandcheck_malwarechecks both reused their results after the real edit.Both commands used
--locked --offline -j8, signed -26 Cargo, and Ohm's procedural-macro and native-tool trust. The candidate had independent release PGO and BOLT training. We count whole-process CallgrindIrfor every ordinary Cargo-selected rustc, combining disjoint groups of compilers from two restorations of the same starting state. The replay checks all 580 original streams, command lines, executable mappings, dependency inputs, products, incremental graphs, and cold public fingerprints.The linked regressions check current diagnostic locations and invalidation after trait-bound, closure, and opaque-iterator changes. Warm and cold diagnostics agree under both trait solvers. The v10 metadata layout remains readable in both compiler directions; the private incremental format advances so older query caches are rebuilt.
We also repeated both checks with the published Ohm -26 and -27 GNU toolchains. Across two fresh pairs per command, -27 used 21.51–21.75% fewer rustc instructions for the library check and 21.44–21.52% fewer for the workspace check. Ohm -27 release