diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-01-21 09:20:35 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-01-21 09:20:35 -0800 |
| commit | 87c3ee861ec488827044e07d5d0cd7c8508c681f (patch) | |
| tree | 49a374a1baf3e3b816120ffdbf28959e10a5ea34 /src/libstd/collections | |
| parent | e4b81d25122b0ff230182375d09300d5403b1750 (diff) | |
| parent | 3cb9fa26ef9905c00a29ea577fb55a12a91c8e7b (diff) | |
| download | rust-87c3ee861ec488827044e07d5d0cd7c8508c681f.tar.gz rust-87c3ee861ec488827044e07d5d0cd7c8508c681f.zip | |
rollup merge of #21457: alexcrichton/issue-21436
Conflicts: src/liballoc/boxed.rs src/librustc/middle/traits/error_reporting.rs src/libstd/sync/mpsc/mod.rs
Diffstat (limited to 'src/libstd/collections')
| -rw-r--r-- | src/libstd/collections/hash/map.rs | 12 | ||||
| -rw-r--r-- | src/libstd/collections/hash/set.rs | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index ac071b05816..342d00a23c8 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -18,7 +18,7 @@ use borrow::BorrowFrom; use clone::Clone; use cmp::{max, Eq, PartialEq}; use default::Default; -use fmt::{self, Show}; +use fmt::{self, Debug}; use hash::{self, Hash, SipHasher}; use iter::{self, Iterator, ExactSizeIterator, IteratorExt, FromIterator, Extend, Map}; use marker::Sized; @@ -270,7 +270,7 @@ fn test_resize_policy() { /// ``` /// use std::collections::HashMap; /// -/// #[derive(Hash, Eq, PartialEq, Show)] +/// #[derive(Hash, Eq, PartialEq, Debug)] /// struct Viking { /// name: String, /// country: String, @@ -1216,8 +1216,8 @@ impl<K, V, S, H> Eq for HashMap<K, V, S> {} #[stable] -impl<K, V, S, H> Show for HashMap<K, V, S> - where K: Eq + Hash<H> + Show, V: Show, +impl<K, V, S, H> Debug for HashMap<K, V, S> + where K: Eq + Hash<H> + Debug, V: Debug, S: HashState<Hasher=H>, H: hash::Hasher<Output=u64> { @@ -1996,8 +1996,8 @@ mod test_map { let map_str = format!("{:?}", map); - assert!(map_str == "HashMap {1i: 2i, 3i: 4i}" || - map_str == "HashMap {3i: 4i, 1i: 2i}"); + assert!(map_str == "HashMap {1: 2, 3: 4}" || + map_str == "HashMap {3: 4, 1: 2}"); assert_eq!(format!("{:?}", empty), "HashMap {}"); } diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs index 1293f45161d..29e247d96d2 100644 --- a/src/libstd/collections/hash/set.rs +++ b/src/libstd/collections/hash/set.rs @@ -15,7 +15,7 @@ use clone::Clone; use cmp::{Eq, PartialEq}; use core::marker::Sized; use default::Default; -use fmt::Show; +use fmt::Debug; use fmt; use hash::{self, Hash}; use iter::{Iterator, ExactSizeIterator, IteratorExt, FromIterator, Map, Chain, Extend}; @@ -71,7 +71,7 @@ use super::state::HashState; /// /// ``` /// use std::collections::HashSet; -/// #[derive(Hash, Eq, PartialEq, Show)] +/// #[derive(Hash, Eq, PartialEq, Debug)] /// struct Viking<'a> { /// name: &'a str, /// power: uint, @@ -596,8 +596,8 @@ impl<T, S, H> Eq for HashSet<T, S> {} #[stable] -impl<T, S, H> fmt::Show for HashSet<T, S> - where T: Eq + Hash<H> + fmt::Show, +impl<T, S, H> fmt::Debug for HashSet<T, S> + where T: Eq + Hash<H> + fmt::Debug, S: HashState<Hasher=H>, H: hash::Hasher<Output=u64> { @@ -1179,7 +1179,7 @@ mod test_set { let set_str = format!("{:?}", set); - assert!(set_str == "HashSet {1i, 2i}" || set_str == "HashSet {2i, 1i}"); + assert!(set_str == "HashSet {1, 2}" || set_str == "HashSet {2, 1}"); assert_eq!(format!("{:?}", empty), "HashSet {}"); } |
