Uh oh!
There was an error while loading. Please reload this page.
Make broken MIR a proper lint. - #119260
Conversation
rustbot
commented
Dec 23, 2023
r? @TaKO8Ki (rustbot has picked a reviewer for you, use r? to override) |
rustbot
commented
Dec 23, 2023
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| /// The `broken_mir` statically detects undefined behaviour in the MIR optimization pipeline. | ||
| /// This is an internal lint, and not intended to be used directly. | ||
| pub rustc::BROKEN_MIR, | ||
| Deny, |
There was a problem hiding this comment.
One use case is to use expect. And you cannot expect a forbidden lint.
| crate::declare_tool_lint! { | ||
| /// The `broken_mir` statically detects undefined behaviour in the MIR optimization pipeline. | ||
| /// This is an internal lint, and not intended to be used directly. | ||
| pub rustc::BROKEN_MIR, | ||
| Deny, | ||
| "broken MIR", | ||
| report_in_external_macro: true | ||
| } |
There was a problem hiding this comment.
Bike-shedding: The term broken MIR is already used when validation fails. It also overstates the severity of what is being reported. Maybe unusual MIR?
There was a problem hiding this comment.
I do believe broken is the right term here
There was a problem hiding this comment.
In what sense is this MIR broken?
The motivation behind moving those checks out of validator was the fact that there is nothing inherently wrong about violating them. Those reports should NOT be treated as bugs. It doesn't even mean that the user provided program has an undefined behaviour, since we don't know whether those instructions are ever executed.
bors
commented
Dec 30, 2023
☔ The latest upstream changes (presumably #119377) made this pull request unmergeable. Please resolve the merge conflicts. |
1176c87 to
0cbefd5Compare
This comment has been minimized.
This comment has been minimized.
bors
commented
Jan 5, 2024
☔ The latest upstream changes (presumably #119621) made this pull request unmergeable. Please resolve the merge conflicts. |
compiler-errors
commented
Feb 5, 2024
@rustbot author |
Dylan-DPC
commented
Aug 2, 2024
@cjgillot any updates on this? thanks |
This comment has been minimized.
This comment has been minimized.
bors
commented
Aug 19, 2024
☔ The latest upstream changes (presumably #129261) made this pull request unmergeable. Please resolve the merge conflicts. |
ping from triage - can you post your status on this PR? There hasn't been an update in a few months, and there are build and merge conflicts. Thanks! FYI: when a PR is ready for review, send a message containing |
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.
rust-log-analyzer
commented
Oct 8, 2025
The job Click to see the possible cause of the failure (guessed by this bot) |
bors
commented
Dec 19, 2025
☔ The latest upstream changes (presumably #150110) made this pull request unmergeable. Please resolve the merge conflicts. |
This allows to use
expect(rustc::broken_mir)when we actually expect it to fire.cc @tmiasko
@matthiaskrgr this should address #119077 (comment)