Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make MIR cleanup for functions with impossible predicates into a real MIR pass #135377

Merged
merged 1 commit into from
Jan 12, 2025

Conversation

compiler-errors
Copy link
Member

It's a bit jarring to see the body of a function with an impossible-to-satisfy where clause suddenly go to a single unreachable terminator when looking at the MIR dump output in order, and I discovered it's because we manually replace the body outside of a MIR pass.

Let's make it into a fully flegded MIR pass so it's more clear what it's doing and when it's being applied.

@rustbot
Copy link
Collaborator

rustbot commented Jan 11, 2025

r? @wesleywiser

rustbot has assigned @wesleywiser.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot
Copy link
Collaborator

rustbot commented Jan 11, 2025

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 11, 2025
@oli-obk
Copy link
Contributor

oli-obk commented Jan 12, 2025

@bors r+

@bors
Copy link
Contributor

bors commented Jan 12, 2025

📌 Commit f1d6226 has been approved by oli-obk

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 12, 2025
@oli-obk oli-obk assigned oli-obk and unassigned wesleywiser Jan 12, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 12, 2025
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#129259 (Add inherent versions of MaybeUninit methods for slices)
 - rust-lang#135374 (Suggest typo fix when trait path expression is typo'ed)
 - rust-lang#135377 (Make MIR cleanup for functions with impossible predicates into a real MIR pass)
 - rust-lang#135378 (Remove a bunch of diagnostic stashing that doesn't do anything)
 - rust-lang#135397 (compiletest: add erroneous variant to `string_enum`s conversions error)
 - rust-lang#135398 (add more crash tests)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 988137c into rust-lang:master Jan 12, 2025
6 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 12, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jan 12, 2025
Rollup merge of rust-lang#135377 - compiler-errors:impossible-step, r=oli-obk

Make MIR cleanup for functions with impossible predicates into a real MIR pass

It's a bit jarring to see the body of a function with an impossible-to-satisfy where clause suddenly go to a single `unreachable` terminator when looking at the MIR dump output in order, and I discovered it's because we manually replace the body outside of a MIR pass.

Let's make it into a fully flegded MIR pass so it's more clear what it's doing and when it's being applied.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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
Development

Successfully merging this pull request may close these issues.

5 participants