-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
ICE on match of const variables: destructure_const #93470
Comments
I tracked down the HashStable implementation bug to Let me see if I can put a PR up. @rustbot claim |
So The issue here is we have two allocation IDs pointing to the same underlying allocation, so their HashStable collides but their Eq implementations say they're unequal. Not sure what behavior we want. It seems like we need to differentiate AllocIds in structs that should behave like the existing HashStable behavior (unwrapping and comparing their inner allocations), and AllocIds that act just like newtype wrappers around numbers. cc: @oli-obk (saw you added this HashStable impl in #46882). |
also cc: @Aaron1011, this might have to do something with (would using that trait have prevented this? just saw the PR a few hours ago, didn't have time to look it over yet!) |
Closing as duplicate in favor of #83085 (which has a patch for fixing the issue in progress) |
I am getting an ICE on the following code.
The ICE is always reproducible in a clean build, but in an incremental build, I can bypass the ICE by removing the
foo
function, compiling, and then adding thefoo
function back again.This is possibly related to #89690 or #83085 given the similar error message, but I am filing a new issue with my own reduced case because the stack is different.
Code
Gist: https://gist.github.com/sffc/f09a3a468a82210a713dc9d8b408b46d
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: