-
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
Implement Hash for TreeSet #15633
Implement Hash for TreeSet #15633
Conversation
It seems like we should be able to derive Hash instead. |
I'm not really sure how #[deriving] works, but I'm guessing that would require that TreeMap implement Hash as well? (And the TreeNode structure that TreeMap uses as well). I'll try it. |
This may actually have problems with |
|
Aha, indeed! |
I'm having some difficulty understanding how to do this. Is there a way to manually implement Hash for TreeMap without using iter()? Because iter() is only implemented for keys that implement Ord, which means that Hash is only implemented for TreeMap's where the key implements Ord. This yields the following error when trying to derive Hash for TreeSet:
|
Ah, yeah, you may have to manually implement |
Looks good to me! Could you squash the commits as well? |
Done. |
scip: Allow customizing cargo config. Re-use the LSP config json for simplicity.
cc #15294