about summary refs log tree commit diff
path: root/src/libstd/collections
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-02-03 10:40:33 +0000
committerbors <bors@rust-lang.org>2015-02-03 10:40:33 +0000
commitcfc91090e9676104b7a9a7c707ea70f0842ed6de (patch)
tree89ea6db4c3ee3cfe7b41b3d7953dc4f1c32f21ad /src/libstd/collections
parent336c8d2e9c6b276b162bdb3edd43706372e6eddd (diff)
parent9836742d6a5bd610074d2d944d472b0dfed3991b (diff)
Auto merge of #21745 - chris-morgan:add-missing-unstable-attributes, r=huonw
I’d kind of like to be able to use HashState in AnyMap, which I can’t do without a stability attribute on it. While I was at it I looked around and found a few more missing.
Diffstat (limited to 'src/libstd/collections')
-rw-r--r--src/libstd/collections/hash/map.rs3
-rw-r--r--src/libstd/collections/hash/state.rs2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs
index 7b3cc434f0c..205eeb75b5b 100644
--- a/src/libstd/collections/hash/map.rs
+++ b/src/libstd/collections/hash/map.rs
@@ -46,6 +46,7 @@ use super::table::BucketState::{
 use super::state::HashState;
 
 const INITIAL_LOG2_CAP: uint = 5;
+#[unstable(feature = "std_misc")]
 pub const INITIAL_CAPACITY: uint = 1 << INITIAL_LOG2_CAP; // 2^5
 
 /// The default behavior of HashMap implements a load factor of 90.9%.
@@ -1622,6 +1623,8 @@ impl Default for RandomState {
 /// typically declare an ability to explicitly hash into this particular type,
 /// but rather in a `H: hash::Writer` type parameter.
 #[allow(missing_copy_implementations)]
+#[unstable(feature = "std_misc",
+           reason = "hashing an hash maps may be altered")]
 pub struct Hasher { inner: SipHasher }
 
 impl hash::Writer for Hasher {
diff --git a/src/libstd/collections/hash/state.rs b/src/libstd/collections/hash/state.rs
index ffbc958f179..79e01304fb8 100644
--- a/src/libstd/collections/hash/state.rs
+++ b/src/libstd/collections/hash/state.rs
@@ -24,6 +24,7 @@ use hash;
 /// algorithm can implement the `Default` trait and create hash maps with the
 /// `DefaultState` structure. This state is 0-sized and will simply delegate
 /// to `Default` when asked to create a hasher.
+#[unstable(feature = "std_misc", reason = "hasher stuff is unclear")]
 pub trait HashState {
     type Hasher: hash::Hasher;
 
@@ -35,6 +36,7 @@ pub trait HashState {
 /// default trait.
 ///
 /// This struct has is 0-sized and does not need construction.
+#[unstable(feature = "std_misc", reason = "hasher stuff is unclear")]
 pub struct DefaultState<H>;
 
 impl<H: Default + hash::Hasher> HashState for DefaultState<H> {