-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Hash portability between compiler versions is potentially misleading #144540
Copy link
Copy link
Open
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Location
https://doc.rust-lang.org/std/hash/trait.Hash.html#portability
Summary
Whether
HashandHasheris portable between compiler versions is ambiguously documented, and potentially misleading.Changes to the default behaviour of
Hasherare frequently[1] discussed[2] without considering portability between rust versions. I am not aware of any breaking changes on stable rust yet, but implying thatHasheroutput can be stable between compiler versions seems misleading.A rust-users discussion over whether rapidhash can offer a
Hasher-compatible persistent hasher has generated conflicting opinions.I think it would be restrictive to future work on the
Hashtrait to claim thatHashandHasherare portable between compiler versions, and suggest that non-portability between compiler versions is made explicit in both theHashandHasherdocumentation.Very happy to be convinced otherwise, as it would let me build a persistent
RapidHasherif portability is indeed guaranteed. Thanks!