Skip to content

support deriving Hash for nullary structs #21162

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jan 16, 2015
Merged

support deriving Hash for nullary structs #21162

merged 1 commit into from
Jan 16, 2015

Conversation

apasel422
Copy link
Contributor

This fixes #16530 by hashing nullary structs the same way as the empty tuple. Other approaches are possible, but this was the simplest.

@rust-highfive
Copy link
Contributor

r? @huonw

(rust_highfive has picked a reviewer for you, use r? to override)

@apasel422
Copy link
Contributor Author

I don't think the test failure is related to this PR.

bors added a commit that referenced this pull request Jan 16, 2015
This fixes #16530 by hashing nullary structs [the same way as the empty tuple] (https://github.com/rust-lang/rust/blob/master/src/libcore/hash/mod.rs#L185). Other approaches are possible, but this was the simplest.
@bors bors merged commit 716effa into rust-lang:master Jan 16, 2015
@apasel422 apasel422 deleted the issue-16530 branch January 16, 2015 19:44
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE on deriving(Hash) on struct with no fields
4 participants