Add attributes for generating Eq/PartialEq/Ord/PartialOrd/Hash#76
Open
jrb0001 wants to merge 1 commit intodanlehmann:mainfrom
Open
Add attributes for generating Eq/PartialEq/Ord/PartialOrd/Hash#76jrb0001 wants to merge 1 commit intodanlehmann:mainfrom
jrb0001 wants to merge 1 commit intodanlehmann:mainfrom
Conversation
Owner
|
First of all, thanks for your contribution. I am however not sure it's a good idea. Should we really ignore unused bits in equality comparisons? I think a point could be made either way, so I'm a little hesitant to actually make a call here (if anything, I'd probably have opted for the opposite and included the unused bits - basically, just have PartialEq and Eq forward to the inner value). Similarly for comparisons: Is declaration order really such an obvious one? So far, declaration order doesn't affect behavior in any way, so this would suddenly put some meaning on it. Not saying we don't want this, but I think we need a bit of a discussion on why these are the choices that feel natural to you. What problem is this solving? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds attributes to generate
Eq/PartialEq/Ord/PartialOrd/Hashimpls. Inspired by theDebugimpl from #70.