Skip to content

std: Stabilize the hash module#22480

Merged
bors merged 1 commit into
rust-lang:masterfrom
alexcrichton:hashv3
Feb 19, 2015
Merged

std: Stabilize the hash module#22480
bors merged 1 commit into
rust-lang:masterfrom
alexcrichton:hashv3

Conversation

@alexcrichton

Copy link
Copy Markdown
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
Copy Markdown
Contributor

r? @nikomatsakis

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

@alexcrichton

Copy link
Copy Markdown
Member Author

r? @aturon

@alexcrichton

Copy link
Copy Markdown
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
Comment thread src/libcore/hash/mod.rs

Copy link
Copy Markdown
Contributor

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

aturon commented Feb 18, 2015

Copy link
Copy Markdown
Contributor

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

aturon commented Feb 18, 2015

Copy link
Copy Markdown
Contributor

@bors: r+ fbad3bf

@aturon

aturon commented Feb 18, 2015

Copy link
Copy Markdown
Contributor

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

@bors

bors commented Feb 18, 2015

Copy link
Copy Markdown
Collaborator

⌛ Testing commit fbad3bf with merge c77b248...

@bors

bors commented Feb 18, 2015

Copy link
Copy Markdown
Collaborator

💔 Test failed - auto-linux-32-opt

@alexcrichton

Copy link
Copy Markdown
Member Author

@bors: r=aturon f83e23a p=1

@bors

bors commented Feb 18, 2015

Copy link
Copy Markdown
Collaborator

⌛ Testing commit f83e23a with merge 68ff044...

@bors

bors commented Feb 18, 2015

Copy link
Copy Markdown
Collaborator

💔 Test failed - auto-win-64-opt

@bors

bors commented Feb 18, 2015

Copy link
Copy Markdown
Collaborator

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

@bors

bors commented Feb 18, 2015

Copy link
Copy Markdown
Collaborator

💔 Test failed - auto-win-32-opt

@bors

bors commented Feb 18, 2015

Copy link
Copy Markdown
Collaborator

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

@bors

bors commented Feb 18, 2015

Copy link
Copy Markdown
Collaborator

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

@alexcrichton

Copy link
Copy Markdown
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

bors commented Feb 19, 2015

Copy link
Copy Markdown
Collaborator

⌛ Testing commit f83e23a with merge fe7b8b2...

@bors

bors commented Feb 19, 2015

Copy link
Copy Markdown
Collaborator

💔 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
lnicola pushed a commit to lnicola/rust that referenced this pull request Jun 1, 2026
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