Repository navigation
Fix ICE of layout mismatch during const eval - #165898
frank-king wants to merge 2 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
9947b94 to
c20d067
Compare
This comment has been minimized.
This comment has been minimized.
c20d067 to
e00ef89
Compare
This comment has been minimized.
This comment has been minimized.
|
Some changes occurred to the CTFE machinery Some changes occurred to the CTFE / Miri interpreter cc @rust-lang/miri This PR changes a file inside |
|
r? @chenyukang rustbot has assigned @chenyukang. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
e00ef89 to
ac259d5
Compare
|
The job Click to see the possible cause of the failure (guessed by this bot) |
| known_layout.ty, | ||
| check_layout.ty, | ||
| ); | ||
| span_delayed_layout_mismatch_bug( |
There was a problem hiding this comment.
I don't think this is a good idea. The MIR is apparently invalid, we should not try to continue evaluating broken MIR.
There was a problem hiding this comment.
Oh, you are also throwing an error. The function name is misleading then.
But also, I am not sure that's a good idea. Something is wrong elsewhere in the compiler if we are asked to interpreted ill-typed MIR. There are a lot of places where the interpreter assumes that things are well-typed, this PR is only scratching the surface. Accepting this PR means entering a never-ending game of whack-a-mole to find them all, making the code harder to read and harder to maintain while replacing assertions with softer errors. That's a bad idea IMO.
There was a problem hiding this comment.
Thanks! Let me see if the type error could be blocked during typeck.
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
|
What we usually do is to taint the type or the MIR. Not sure how that works in detail though.
|
|
Find this PR: #160466. |
|
Close in favor of #160237. |
Fixes #161532, #161532, #125772, #118778.