Fix ICE when trying to convert ConstKind::Error to usize#113712
Fix ICE when trying to convert ConstKind::Error to usize#113712syvb wants to merge 1 commit intorust-lang:masterfrom
ConstKind::Error to usize#113712Conversation
This comment has been minimized.
This comment has been minimized.
|
r? @BoxyUwU please remove the first 5 commits |
226df21 to
f0b6a13
Compare
f0b6a13 to
2ee8eb2
Compare
|
Why is this code path even reached? If there is an error in the constant, the typeck results or THIR should be tainted, and MIR building should not happen. Any idea why this does not happen? |
|
@cjgillot I bisected this (#113021 (comment)), and this ICE was probably caused by #99798 (which added |
|
r? @oli-obk You can use |
|
closing in favor of #117046 |
Fixes an ICE (#113021) caused by trying to convert a
ConstKind::Errorto a usize.Instead of panicking in the call to
eval_target_usizeinprefix_slice_suffix,prefix_slice_suffixnow bails and does nothing. If it sees aConstKind::Error, then there has already been an error reported so not doing anything shouldn't be a problem.Closes #113021.
r? @matthiaskrgr