Uh oh!
There was an error while loading. Please reload this page.
Perform unused assignment and unused variables lints on MIR. - #101500
Perform unused assignment and unused variables lints on MIR.#101500cjgillot wants to merge 3 commits into
Conversation
rustbot
commented
Sep 6, 2022
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt This PR changes MIR cc @oli-obk, @RalfJung, @JakobDegen, @davidtwco, @celinval, @vakaras |
rust-highfive
commented
Sep 6, 2022
r? @davidtwco (rust-highfive has picked a reviewer for you, use r? to override) |
rustbot
commented
Sep 6, 2022
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
bors
commented
Mar 16, 2023
☔ The latest upstream changes (presumably #108944) made this pull request unmergeable. Please resolve the merge conflicts. |
rustbot
commented
Mar 18, 2023
The Miri subtree was changed cc @rust-lang/miri |
There was a problem hiding this comment.
Yes. Added it to the description.
There was a problem hiding this comment.
Actually, it doesn't need to be. I'll remove that commit in a few.
bors
commented
Mar 18, 2023
☔ The latest upstream changes (presumably #109303) made this pull request unmergeable. Please resolve the merge conflicts. |
bors
commented
Mar 21, 2023
☔ The latest upstream changes (presumably #109092) made this pull request unmergeable. Please resolve the merge conflicts. |
20ad900 to
8322e70Comparebors
commented
Apr 21, 2023
☔ The latest upstream changes (presumably #96840) made this pull request unmergeable. Please resolve the merge conflicts. |
This comment has been minimized.
This comment has been minimized.
bors
commented
Apr 22, 2023
☔ The latest upstream changes (presumably #106934) made this pull request unmergeable. Please resolve the merge conflicts. |
rustbot
commented
Jul 8, 2023
Some changes might have occurred in exhaustiveness checking cc @Nadrieril |
This comment has been minimized.
This comment has been minimized.
bors
commented
Jul 13, 2023
☔ The latest upstream changes (presumably #113646) made this pull request unmergeable. Please resolve the merge conflicts. |
Dylan-DPC
commented
Feb 4, 2024
@cjgillot any updates on this |
This comment was marked as outdated.
This comment was marked as outdated.
Dylan-DPC
commented
Mar 10, 2024
oh nvm this was blocked |
rustbot
commented
Apr 7, 2024
Some changes occurred in match lowering cc @Nadrieril |
| /// Is this the leftmost occurrence of the binding, i.e., is `var` the | ||
| /// `HirId` of this pattern? | ||
| is_primary: bool, | ||
| is_shorthand: bool, |
There was a problem hiding this comment.
Could you document what "shorthand" means?
rust-log-analyzer
commented
Apr 7, 2024
The job Click to see the possible cause of the failure (guessed by this bot) |
bors
commented
Apr 8, 2024
☔ The latest upstream changes (presumably #123569) made this pull request unmergeable. Please resolve the merge conflicts. |
Dylan-DPC
commented
Jan 24, 2025
Closing this as it's been blocked on another pr for a long time and that pr is in draft state and hasn't moved and this one has bitrotted. |
Based on #101399Based on #102256Blocked on #108993
Rough attempt to #51003.
This is my first stab at using the dataflow framework, so please be gentle 😄
In order to keep the same level of diagnostics, I had to instrument MIR a little more:
let _ =syntax. This changes the behaviour oflet _ = <access to unsafe field>currently type-checks #54003, I don't know if it's still desirable.VarBindingFormthe list of introducer places and whether this was a shorthand pattern.I am not very proud of the handling of self-assignments. The proposed scheme is in two parts: first detect probable self-assignments, by pattern matching on MIR, and second treat them specially during dataflow analysis. I welcome ideas.
I did not attempt to rewrite the dead-code lint, as #100288 does it.