feat(mir): validate nominal and link metadata - #691
Merged
Conversation
sanohiro
marked this pull request as ready for review
August 2, 2026 03:07
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
Add the am-n HIR-to-MIR preflight for nominal and linker metadata. The validator now checks
combined internal-name uniqueness, source-name kind and recursively id-free shape equality,
member names, tuple interning uniqueness, alignment, enum field bases, and link-library names.
All four lowering entrypoints fail closed to canonical empty MIR for invalid handcrafted HIR while
valid MIR remains unchanged. Add the shared-DAG correspondence regression, deep source-shape
coverage, and the library-boundary benchmark row.
Validation
scripts/pre-pr.sh --base origin/main ...passed, includingscripts/test-pr.sh.cargo test -p align_mir --lib: 44 passed.cargo build --workspace --locked: passed.cargo clippy --workspace --all-targets --locked -- -D warnings: passed.align_driverper-unit codegen passed 9/9 before the final cache-only follow-up; the latestrerun compiled successfully but was interrupted after the test binary paused in macOS
_dyld_start.llvm-config-22is unavailable.Review