Avoid ICE in known_panics_lint for mismatched type const literals#156463
Avoid ICE in known_panics_lint for mismatched type const literals#156463reddevilmidzy wants to merge 1 commit into
known_panics_lint for mismatched type const literals#156463Conversation
|
I first tried fixing this during literal-to-const lowering, but that either changed the existing diagnostics or introduced additional delayed-bug ICEs. The type mismatch is already diagnosed earlier, so this instead makes |
known_panics_lint for mismatched type const literals
|
r? @BoxyUwU |
|
|
|
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
| _ => return None, | ||
| } | ||
|
|
||
| if value.layout.size != to.size { |
There was a problem hiding this comment.
This fixes the symptom, not the issue itself. Why do we even get here after the error is reported?
Oh I think I may have found it: https://github.com/rust-lang/rust/pull/152001/changes#r3224335944
close: #154748
close: #154750