diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-12-17 08:35:22 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-12-17 11:50:29 -0800 |
| commit | 3369b33a20001d7ff1871f39389dfb9ed3fbb829 (patch) | |
| tree | 1b5f283b3d16f4c296669e8d73b9b1a2198554a3 /src/libstd | |
| parent | cada943f145cf85d2b01b9046dde8ff599670b80 (diff) | |
| parent | 9021f61ef7979cb146c5786e1c54c6d928cc0483 (diff) | |
| download | rust-3369b33a20001d7ff1871f39389dfb9ed3fbb829.tar.gz rust-3369b33a20001d7ff1871f39389dfb9ed3fbb829.zip | |
rollup merge of #19902: alexcrichton/second-pass-mem
This commit stabilizes the `mem` and `default` modules of std.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/collections/hash/map.rs | 2 | ||||
| -rw-r--r-- | src/libstd/collections/hash/set.rs | 2 | ||||
| -rw-r--r-- | src/libstd/hash.rs | 2 | ||||
| -rw-r--r-- | src/libstd/io/mod.rs | 2 |
4 files changed, 8 insertions, 0 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index d22e7b2f764..08f5544effb 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -1288,7 +1288,9 @@ impl<K: Eq + Hash<S> + Show, V: Show, S, H: Hasher<S>> Show for HashMap<K, V, H> } } +#[stable] impl<K: Eq + Hash<S>, V, S, H: Hasher<S> + Default> Default for HashMap<K, V, H> { + #[stable] fn default() -> HashMap<K, V, H> { HashMap::with_hasher(Default::default()) } diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs index c4356d91064..e00c62cbe2d 100644 --- a/src/libstd/collections/hash/set.rs +++ b/src/libstd/collections/hash/set.rs @@ -608,7 +608,9 @@ impl<T: Eq + Hash<S>, S, H: Hasher<S> + Default> Extend<T> for HashSet<T, H> { } } +#[stable] impl<T: Eq + Hash<S>, S, H: Hasher<S> + Default> Default for HashSet<T, H> { + #[stable] fn default() -> HashSet<T, H> { HashSet::with_hasher(Default::default()) } diff --git a/src/libstd/hash.rs b/src/libstd/hash.rs index a63abec96d5..52e3c718b2d 100644 --- a/src/libstd/hash.rs +++ b/src/libstd/hash.rs @@ -95,7 +95,9 @@ impl Hasher<sip::SipState> 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 6fc9d0bd172..6a6d467e86c 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() } } |
