-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Fix ICE when trying to convert ConstKind::Error
to usize
#113712
Conversation
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::Error
to a usize.Instead of panicking in the call to
eval_target_usize
inprefix_slice_suffix
,prefix_slice_suffix
now 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