Skip to content
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

std: Stabilize the hash module #22480

Merged
merged 1 commit into from
Feb 19, 2015
Merged

std: Stabilize the hash module #22480

merged 1 commit into from
Feb 19, 2015

Conversation

alexcrichton
Copy link
Member

This commit is an implementation of RFC 823 which is another pass over
the std::hash module for stabilization. The contents of the module were not
entirely marked stable, but some portions which remained quite similar to the
previous incarnation are now marked #[stable]. Specifically:

  • std::hash is now stable (the name)
  • Hash is now stable
  • Hash::hash is now stable
  • Hasher is now stable
  • SipHasher is now stable
  • SipHasher::new and new_with_keys are now stable
  • Hasher for SipHasher is now stable
  • Many Hash implementations are now stable

All other portions of the hash module remain #[unstable] as they are less
commonly used and were recently redesigned.

This commit is a breaking change due to the modifications to the std::hash API
and more details can be found on the RFC.

Closes #22467
[breaking-change]

@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

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

@alexcrichton
Copy link
Member Author

r? @aturon

@alexcrichton
Copy link
Member Author

The diff stat is a bit alarming, but it's 99% due to #[cfg(stage0)] which is in turn due to derive(Hash).

@alexcrichton alexcrichton force-pushed the hashv3 branch 2 times, most recently from fea7ad7 to 3143c4b Compare February 18, 2015 07:23
@@ -76,22 +72,123 @@ mod sip;
/// to compute the hash. Specific implementations of this trait may specialize
/// for particular instances of `H` in order to be able to optimize the hashing
/// behavior.
#[cfg(not(stage0))]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The doc comment above here is slightly stale -- some of it should move to the methods, I think.

@aturon
Copy link
Member

aturon commented Feb 18, 2015

So... I don't know how to meaningfully review the 4+kloc of stage0 fallout here, but the changes to the core module LGTM. Let me know if there's any particular area of fallout that you think wants more scrutiny.

This commit is an implementation of [RFC 823][rfc] which is another pass over
the `std::hash` module for stabilization. The contents of the module were not
entirely marked stable, but some portions which remained quite similar to the
previous incarnation are now marked `#[stable]`. Specifically:

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0823-hash-simplification.md

* `std::hash` is now stable (the name)
* `Hash` is now stable
* `Hash::hash` is now stable
* `Hasher` is now stable
* `SipHasher` is now stable
* `SipHasher::new` and `new_with_keys` are now stable
* `Hasher for SipHasher` is now stable
* Many `Hash` implementations are now stable

All other portions of the `hash` module remain `#[unstable]` as they are less
commonly used and were recently redesigned.

This commit is a breaking change due to the modifications to the `std::hash` API
and more details can be found on the [RFC][rfc].

Closes rust-lang#22467
[breaking-change]
@aturon
Copy link
Member

aturon commented Feb 18, 2015

@bors: r+ fbad3bf

@aturon
Copy link
Member

aturon commented Feb 18, 2015

@bors: p=1 (important stabilization to land pre-alpha2 if possible)

@bors
Copy link
Contributor

bors commented Feb 18, 2015

⌛ Testing commit fbad3bf with merge c77b248...

@bors
Copy link
Contributor

bors commented Feb 18, 2015

💔 Test failed - auto-linux-32-opt

@alexcrichton
Copy link
Member Author

@bors: r=aturon f83e23a p=1

@bors
Copy link
Contributor

bors commented Feb 18, 2015

⌛ Testing commit f83e23a with merge 68ff044...

@bors
Copy link
Contributor

bors commented Feb 18, 2015

💔 Test failed - auto-win-64-opt

@bors
Copy link
Contributor

bors commented Feb 18, 2015

💔 Test failed - auto-win-32-nopt-t

@bors
Copy link
Contributor

bors commented Feb 18, 2015

💔 Test failed - auto-win-32-opt

@bors
Copy link
Contributor

bors commented Feb 18, 2015

💔 Test failed - auto-win-64-nopt-t

@bors
Copy link
Contributor

bors commented Feb 18, 2015

💔 Test failed - auto-linux-64-nopt-t

@alexcrichton
Copy link
Member Author

@bors: retry

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Feb 19, 2015
This commit is an implementation of [RFC 823][rfc] which is another pass over
the `std::hash` module for stabilization. The contents of the module were not
entirely marked stable, but some portions which remained quite similar to the
previous incarnation are now marked `#[stable]`. Specifically:

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0823-hash-simplification.md

* `std::hash` is now stable (the name)
* `Hash` is now stable
* `Hash::hash` is now stable
* `Hasher` is now stable
* `SipHasher` is now stable
* `SipHasher::new` and `new_with_keys` are now stable
* `Hasher for SipHasher` is now stable
* Many `Hash` implementations are now stable

All other portions of the `hash` module remain `#[unstable]` as they are less
commonly used and were recently redesigned.

This commit is a breaking change due to the modifications to the `std::hash` API
and more details can be found on the [RFC][rfc].

Closes rust-lang#22467
[breaking-change]
@bors
Copy link
Contributor

bors commented Feb 19, 2015

⌛ Testing commit f83e23a with merge fe7b8b2...

@bors
Copy link
Contributor

bors commented Feb 19, 2015

💔 Test failed - auto-linux-32-opt

@bors bors merged commit f83e23a into rust-lang:master Feb 19, 2015
Manishearth added a commit to Manishearth/rust that referenced this pull request Feb 24, 2015
…excrichton

 This commit has already been merged in rust-lang#21774,
but i think it has been accidently overriden by rust-lang#22584 and rust-lang#22480.
r? @alexcrichton
@alexcrichton alexcrichton deleted the hashv3 branch March 27, 2015 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracking issue for Simplify std::hash (RFC 823)
5 participants