Uh oh!
There was an error while loading. Please reload this page.
Extend the enum check to pointer and union reads - #144353
Conversation
rustbot
commented
Jul 23, 2025
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.
This comment was marked as outdated.
This comment was marked as outdated.
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.
34076b4 to
1db3517Compare
This comment has been minimized.
This comment has been minimized.
e9cba62 to
8ae0303Compare
This comment has been minimized.
This comment has been minimized.
saethlin
commented
Sep 20, 2025
CI doesn't pass, so I'm setting this to waiting on author. If that's wrong and you want help with getting CI to pass, give a shout. |
8ae0303 to
bae1afdCompare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bae1afd to
a969bf9Compare
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.
557081f to
5bf5a01Compare
This comment has been minimized.
This comment has been minimized.
5bf5a01 to
e167550Comparerustbot
commented
Dec 9, 2025
Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 |
This comment has been minimized.
This comment has been minimized.
e167550 to
e6f5eb3Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
e6f5eb3 to
de6589bCompareThis change extends the previously added enum discriminant check to enums read through a union or pointer. At the moment we only insert the check when transmuting to an enum. Although I hoped for it, this check isn't yet inserted for calls to `MaybeUninit::assume_init`, because the pass is running on polymorphic MIR and thus doesn't have the information yet to know whether the type that is read is an enum.
de6589b to
db5c944Comparerustbot
commented
Feb 19, 2026
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This comment has been minimized.
This comment has been minimized.
db5c944 to
82ac9baCompare
This comment has been minimized.
This comment has been minimized.
82ac9ba to
fbc7d13Compare
This comment has been minimized.
This comment has been minimized.
fbc7d13 to
8579266Comparerust-log-analyzer
commented
Feb 19, 2026
The job Click to see the possible cause of the failure (guessed by this bot) |
☔ The latest upstream changes (presumably #153741) made this pull request unmergeable. Please resolve the merge conflicts. |
View all comments
This change extends the previously added enum discriminant check to enums read through a union or pointer. At the moment we only insert the check when transmuting to an enum. Although I hoped for it, this check isn't yet inserted for calls to
MaybeUninit::assume_init, because the pass is running on polymorphic MIR and thus doesn't have the information yet to know whether the type that is read is an enum.This is related to #143087.
r? @saethlin