From 9021f61ef7979cb146c5786e1c54c6d928cc0483 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 15 Dec 2014 20:04:52 -0800 Subject: std: Second pass stabilization of `default` This commit performs a second pass stabilization of the `std::default` module. The module was already marked `#[stable]`, and the inheritance of `#[stable]` was removed since this attribute was applied. This commit adds the `#[stable]` attribute to the trait definition and one method name, along with all implementations found in the standard distribution. --- src/libstd/collections/hash/map.rs | 2 ++ src/libstd/collections/hash/set.rs | 2 ++ src/libstd/hash.rs | 2 ++ src/libstd/io/mod.rs | 2 ++ 4 files changed, 8 insertions(+) (limited to 'src/libstd') diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index 2a8d97eed05..b245f167e9d 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -1288,7 +1288,9 @@ impl + Show, V: Show, S, H: Hasher> Show for HashMap } } +#[stable] impl, V, S, H: Hasher + Default> Default for HashMap { + #[stable] fn default() -> HashMap { HashMap::with_hasher(Default::default()) } diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs index 745a8298ee8..ca8d2df4651 100644 --- a/src/libstd/collections/hash/set.rs +++ b/src/libstd/collections/hash/set.rs @@ -610,7 +610,9 @@ impl, S, H: Hasher + Default> Extend for HashSet { } } +#[stable] impl, S, H: Hasher + Default> Default for HashSet { + #[stable] fn default() -> HashSet { HashSet::with_hasher(Default::default()) } diff --git a/src/libstd/hash.rs b/src/libstd/hash.rs index ac68e1ef121..b2fac31853d 100644 --- a/src/libstd/hash.rs +++ b/src/libstd/hash.rs @@ -95,7 +95,9 @@ impl Hasher for RandomSipHasher { } } +#[stable] impl Default for RandomSipHasher { + #[stable] #[inline] fn default() -> RandomSipHasher { RandomSipHasher::new() diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index 4baeaabc6c6..b9139c5d0e2 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -1911,7 +1911,9 @@ bitflags! { } +#[stable] impl Default for FilePermission { + #[stable] #[inline] fn default() -> FilePermission { FilePermission::empty() } } -- cgit 1.4.1-3-g733a5