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 broken MIR a proper lint. #119260
base: master
Are you sure you want to change the base?
Make broken MIR a proper lint. #119260
Conversation
r? @TaKO8Ki (rustbot has picked a reviewer for you, use r? to override) |
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forbid maybe?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do believe broken is the right term here
☔ The latest upstream changes (presumably #119377) made this pull request unmergeable. Please resolve the merge conflicts. |
The job Click to see the possible cause of the failure (guessed by this bot)
|
☔ The latest upstream changes (presumably #119621) made this pull request unmergeable. Please resolve the merge conflicts. |
@rustbot author |
This allows to use
expect(rustc::broken_mir)
when we actually expect it to fire.cc @tmiasko
@matthiaskrgr this should address #119077 (comment)