]> git.lizzy.rs Git - rust.git/blobdiff - src/libcore/hash/mod.rs
std: Clean out deprecated APIs
[rust.git] / src / libcore / hash / mod.rs
index 9ab55620e0aece5ebad170eb205792215975639e..3c219692bc48de8b5981937d283f41198a93b169 100644 (file)
@@ -194,8 +194,8 @@ fn write_isize(&mut self, i: isize) {
 /// A `BuildHasher` is typically used as a factory for instances of `Hasher`
 /// which a `HashMap` can then use to hash keys independently.
 ///
-/// Note that for each instance of `BuildHasher` the create hashers should be
-/// identical. That is if the same stream of bytes is fed into each hasher the
+/// Note that for each instance of `BuildHasher`, the created hashers should be
+/// identical. That is, if the same stream of bytes is fed into each hasher, the
 /// same output will also be generated.
 #[stable(since = "1.7.0", feature = "build_hasher")]
 pub trait BuildHasher {
@@ -238,30 +238,6 @@ fn default() -> BuildHasherDefault<H> {
     }
 }
 
-// The HashState trait is super deprecated, but it's here to have the blanket
-// impl that goes from HashState -> BuildHasher
-
-/// Deprecated, renamed to `BuildHasher`
-#[unstable(feature = "hashmap_hasher", reason = "hasher stuff is unclear",
-           issue = "27713")]
-#[rustc_deprecated(since = "1.7.0", reason = "support moved to std::hash and \
-                                              renamed to BuildHasher")]
-pub trait HashState {
-    /// Type of the hasher that will be created.
-    type Hasher: Hasher;
-
-    /// Creates a new hasher based on the given state of this object.
-    fn hasher(&self) -> Self::Hasher;
-}
-
-#[unstable(feature = "hashmap_hasher", reason = "hasher stuff is unclear",
-           issue = "27713")]
-#[allow(deprecated)]
-impl<T: HashState> BuildHasher for T {
-    type Hasher = T::Hasher;
-    fn build_hasher(&self) -> T::Hasher { self.hasher() }
-}
-
 //////////////////////////////////////////////////////////////////////////////
 
 mod impls {