-
Notifications
You must be signed in to change notification settings - Fork 13.3k
[feature(adt_const_params)] Bar
doesn't derive both PartialEq
and Eq
#97278
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
Comments
Yeah the reason why this doesn't compile is that |
May I ask why |
My understanding is that I'm not entirely sure, but I think this might all change once we introduce ValTrees (a new type-system representation for constant values) and are able to use them in pattern matching. |
There's also the additional security implications where, if this weren't the case, the compiler would have to run any crate's code for arbitrary constants, whereas right now, crate code is only run directly for build scripts and proc macros. Even if we changed from |
I'v read the issue and the issue, and it seems that neither is my case.
rust version: rustc 1.62.0-nightly (a707f40 2022-04-29)
I tried this code:
I expected to see this the code to be compiled, but it's not:
My guess is that the type
Arc
doesn't implementStructuralPartialEq
, and I tried to use the feature newtype to wrap around theArc
, but still not workingSo is it a bug or is there some limitations? Is there anyway I can make my code compile?
The text was updated successfully, but these errors were encountered: