Skip to content

Do not compute optimized MIR if code does not type-check.#147092

Merged
bors merged 1 commit intorust-lang:masterfrom
cjgillot:late-validate-mir
Sep 29, 2025
Merged

Do not compute optimized MIR if code does not type-check.#147092
bors merged 1 commit intorust-lang:masterfrom
cjgillot:late-validate-mir

Conversation

@cjgillot
Copy link
Contributor

@cjgillot cjgillot commented Sep 27, 2025

Since #128612, we compute optimized MIR when -Zvalidate-mir is present.

This is done as part of required analyses, even if type-checking fails. This causes ICEs, as most of the mir-opt pipeline expects well-formed code.

Fixes #129095
Fixes #134174
Fixes #134654
Fixes #135570
Fixes #136381
Fixes #137468
Fixes #144491
Fixes #147011

This does not fix issue #137190, as it ICEs without -Zvalidate-mir.

r? @compiler-errors

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

Labels

perf-regression Performance regression. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

7 participants