Skip to content

Remove unneeded field from SwitchTargets #105234

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Dec 10, 2022

Conversation

JakobDegen
Copy link
Contributor

@JakobDegen JakobDegen commented Dec 4, 2022

This had a fixme already. The only change in behavior is that the mir dumps now no longer contains labels for the types of the integers on the edges of a switchint:

Before:
image

After:
image

I don't think that's a problem though. The information is still available to a user that really cares by checking the type of _2, so it honestly feels like a bit of an improvement to me.

r? mir

@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 Dec 4, 2022
@rustbot
Copy link
Collaborator

rustbot commented Dec 4, 2022

This PR changes MIR

cc @oli-obk, @RalfJung, @JakobDegen, @davidtwco, @celinval, @vakaras

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@rust-log-analyzer

This comment has been minimized.

@oli-obk
Copy link
Contributor

oli-obk commented Dec 5, 2022

@bors r+

@bors
Copy link
Collaborator

bors commented Dec 5, 2022

📌 Commit 5b8f741 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 Dec 5, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 5, 2022
Remove unneeded field from `SwitchTargets`

This had a fixme already. The only change in behavior is that the mir dumps now no longer contains labels for the types of the integers on the edges of a switchint:

Before:
![image](https://user-images.githubusercontent.com/51179609/205467622-34401a68-dca6-43eb-915e-b9fda1988860.png)

After:
![image](https://user-images.githubusercontent.com/51179609/205467634-b5b2a259-9cb4-4843-845c-592c500f0f9c.png)

I don't think that's a problem though. The information is still available to a user that really cares by checking the type of `_2`, so it honestly feels like a bit of an improvement to me.

r? mir
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 5, 2022
Remove unneeded field from `SwitchTargets`

This had a fixme already. The only change in behavior is that the mir dumps now no longer contains labels for the types of the integers on the edges of a switchint:

Before:
![image](https://user-images.githubusercontent.com/51179609/205467622-34401a68-dca6-43eb-915e-b9fda1988860.png)

After:
![image](https://user-images.githubusercontent.com/51179609/205467634-b5b2a259-9cb4-4843-845c-592c500f0f9c.png)

I don't think that's a problem though. The information is still available to a user that really cares by checking the type of `_2`, so it honestly feels like a bit of an improvement to me.

r? mir
@matthiaskrgr
Copy link
Member

@bors r- failed in a rollup
#105331 (comment)

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 5, 2022
@JakobDegen
Copy link
Contributor Author

Hadn't run coverage tests. They're blessed now an PR is rebaesd

@oli-obk
Copy link
Contributor

oli-obk commented Dec 6, 2022

@bors r+

@bors
Copy link
Collaborator

bors commented Dec 6, 2022

📌 Commit e5b9945ca3f03736181e50b1489a3c28a4682875 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 6, 2022
@bors
Copy link
Collaborator

bors commented Dec 8, 2022

☔ The latest upstream changes (presumably #105425) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 8, 2022
@oli-obk
Copy link
Contributor

oli-obk commented Dec 9, 2022

@bors r+

@bors
Copy link
Collaborator

bors commented Dec 9, 2022

📌 Commit 9fb8da8 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 9, 2022
@JakobDegen
Copy link
Contributor Author

Is the CI failure spurious? Wondering how this can break a rustdoc-gui test...

bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 10, 2022
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#104460 (Migrate parts of `rustc_expand` to session diagnostics)
 - rust-lang#105192 (Point at LHS on binop type err if relevant)
 - rust-lang#105234 (Remove unneeded field from `SwitchTargets`)
 - rust-lang#105239 (Avoid heap allocation when truncating thread names)
 - rust-lang#105410 (Consider `parent_count` for const param defaults)
 - rust-lang#105482 (Fix invalid codegen during debuginfo lowering)

Failed merges:

 - rust-lang#105411 (Introduce `with_forced_trimmed_paths`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b66e123 into rust-lang:master Dec 10, 2022
@rustbot rustbot added this to the 1.68.0 milestone Dec 10, 2022
@JakobDegen JakobDegen deleted the unneeded-field branch December 10, 2022 23:55
# for free to join this conversation on GitHub. Already have an account? # 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.

7 participants