Skip to content

Commit 7028b3f

Browse files
committed
Remove explicit rust code specifier. Unhide use HashMap.
1 parent 0d61c6b commit 7028b3f

File tree

1 file changed

+56
-56
lines changed

1 file changed

+56
-56
lines changed

src/libstd/collections/hashmap.rs

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ impl DefaultResizePolicy {
693693
///
694694
/// # Example
695695
///
696-
/// ```rust
696+
/// ```
697697
/// use std::collections::HashMap;
698698
///
699699
/// // type inference lets us omit an explicit type signature (which
@@ -731,9 +731,9 @@ impl DefaultResizePolicy {
731731
/// ```
732732
///
733733
/// The easiest way to use `HashMap` with a custom type is to derive `Eq` and `Hash`.
734-
/// We must also derive `PartialEq`, this will in the future be implied by `Eq`.
734+
/// We must also derive `PartialEq`, but this will in the future be implied by `Eq`.
735735
///
736-
/// ```rust
736+
/// ```
737737
/// use std::collections::HashMap;
738738
///
739739
/// #[deriving(Hash, Eq, PartialEq, Show)]
@@ -1041,8 +1041,8 @@ impl<K: Hash + Eq, V> HashMap<K, V, RandomSipHasher> {
10411041
///
10421042
/// # Example
10431043
///
1044-
/// ```rust
1045-
/// # use std::collections::HashMap;
1044+
/// ```
1045+
/// use std::collections::HashMap;
10461046
/// let mut map: HashMap<&str, int> = HashMap::new();
10471047
/// ```
10481048
#[inline]
@@ -1054,8 +1054,8 @@ impl<K: Hash + Eq, V> HashMap<K, V, RandomSipHasher> {
10541054
///
10551055
/// # Example
10561056
///
1057-
/// ```rust
1058-
/// # use std::collections::HashMap;
1057+
/// ```
1058+
/// use std::collections::HashMap;
10591059
/// let mut map: HashMap<&str, int> = HashMap::with_capacity(10u);
10601060
/// ```
10611061
#[inline]
@@ -1072,8 +1072,8 @@ impl<K: Eq + Hash<S>, V, S, H: Hasher<S>> HashMap<K, V, H> {
10721072
///
10731073
/// # Example
10741074
///
1075-
/// ```rust
1076-
/// # use std::collections::HashMap;
1075+
/// ```
1076+
/// use std::collections::HashMap;
10771077
/// use std::hash::sip::SipHasher;
10781078
///
10791079
/// let h = SipHasher::new();
@@ -1095,8 +1095,8 @@ impl<K: Eq + Hash<S>, V, S, H: Hasher<S>> HashMap<K, V, H> {
10951095
///
10961096
/// # Example
10971097
///
1098-
/// ```rust
1099-
/// # use std::collections::HashMap;
1098+
/// ```
1099+
/// use std::collections::HashMap;
11001100
/// use std::hash::sip::SipHasher;
11011101
///
11021102
/// let h = SipHasher::new();
@@ -1120,8 +1120,8 @@ impl<K: Eq + Hash<S>, V, S, H: Hasher<S>> HashMap<K, V, H> {
11201120
/// This function has no effect on the operational semantics of the
11211121
/// hashtable, only on performance.
11221122
///
1123-
/// ```rust
1124-
/// # use std::collections::HashMap;
1123+
/// ```
1124+
/// use std::collections::HashMap;
11251125
/// let mut map: HashMap<&str, int> = HashMap::new();
11261126
/// map.reserve(10u);
11271127
/// ```
@@ -1292,8 +1292,8 @@ impl<K: Eq + Hash<S>, V, S, H: Hasher<S>> HashMap<K, V, H> {
12921292
///
12931293
/// # Example
12941294
///
1295-
/// ```rust
1296-
/// # use std::collections::HashMap;
1295+
/// ```
1296+
/// use std::collections::HashMap;
12971297
/// let mut map = HashMap::new();
12981298
///
12991299
/// // Insert 1i with key "a"
@@ -1311,8 +1311,8 @@ impl<K: Eq + Hash<S>, V, S, H: Hasher<S>> HashMap<K, V, H> {
13111311
///
13121312
/// # Example
13131313
///
1314-
/// ```rust
1315-
/// # use std::collections::HashMap;
1314+
/// ```
1315+
/// use std::collections::HashMap;
13161316
/// let mut map = HashMap::new();
13171317
///
13181318
/// // Insert 10u with key 2i
@@ -1332,8 +1332,8 @@ impl<K: Eq + Hash<S>, V, S, H: Hasher<S>> HashMap<K, V, H> {
13321332
///
13331333
/// # Example
13341334
///
1335-
/// ```rust
1336-
/// # use std::collections::HashMap;
1335+
/// ```
1336+
/// use std::collections::HashMap;
13371337
/// let mut map = HashMap::new();
13381338
///
13391339
/// // Insert 2u with key "a"
@@ -1362,7 +1362,7 @@ impl<K: Eq + Hash<S>, V, S, H: Hasher<S>> HashMap<K, V, H> {
13621362
///
13631363
/// # Example
13641364
///
1365-
/// ```rust
1365+
/// ```
13661366
/// use std::collections::HashMap;
13671367
///
13681368
/// // map some strings to vectors of strings
@@ -1419,8 +1419,9 @@ impl<K: Eq + Hash<S>, V, S, H: Hasher<S>> HashMap<K, V, H> {
14191419
///
14201420
/// # Example
14211421
///
1422-
/// ```rust
1423-
/// # use std::collections::HashMap;
1422+
/// ```
1423+
/// use std::collections::HashMap;
1424+
///
14241425
/// let mut map = HashMap::new();
14251426
/// map.insert("a", 1i);
14261427
/// assert_eq!(map.get(&"a"), &1i);
@@ -1437,8 +1438,9 @@ impl<K: Eq + Hash<S>, V, S, H: Hasher<S>> HashMap<K, V, H> {
14371438
///
14381439
/// # Example
14391440
///
1440-
/// ```rust
1441-
/// # use std::collections::HashMap;
1441+
/// ```
1442+
/// use std::collections::HashMap;
1443+
///
14421444
/// let mut map = HashMap::new();
14431445
/// map.insert("a", 1i);
14441446
/// {
@@ -1489,8 +1491,8 @@ impl<K: Eq + Hash<S>, V, S, H: Hasher<S>> HashMap<K, V, H> {
14891491
/// the equivilance class. It is important that the values hash the same,
14901492
/// which is why we override `Hash`.
14911493
///
1492-
/// ```rust
1493-
/// # use std::collections::HashMap;
1494+
/// ```
1495+
/// use std::collections::HashMap;
14941496
/// use std::hash::Hash;
14951497
/// use std::hash::sip::SipState;
14961498
///
@@ -1547,8 +1549,9 @@ impl<K: Eq + Hash<S>, V, S, H: Hasher<S>> HashMap<K, V, H> {
15471549
///
15481550
/// # Example
15491551
///
1550-
/// ```rust
1551-
/// # use std::collections::HashMap;
1552+
/// ```
1553+
/// use std::collections::HashMap;
1554+
///
15521555
/// let mut map = HashMap::new();
15531556
/// map.insert("a", 1i);
15541557
/// map.insert("b", 2i);
@@ -1567,8 +1570,9 @@ impl<K: Eq + Hash<S>, V, S, H: Hasher<S>> HashMap<K, V, H> {
15671570
///
15681571
/// # Example
15691572
///
1570-
/// ```rust
1571-
/// # use std::collections::HashMap;
1573+
/// ```
1574+
/// use std::collections::HashMap;
1575+
///
15721576
/// let mut map = HashMap::new();
15731577
/// map.insert("a", 1i);
15741578
/// map.insert("b", 2i);
@@ -1587,8 +1591,9 @@ impl<K: Eq + Hash<S>, V, S, H: Hasher<S>> HashMap<K, V, H> {
15871591
///
15881592
/// # Example
15891593
///
1590-
/// ```rust
1591-
/// # use std::collections::HashMap;
1594+
/// ```
1595+
/// use std::collections::HashMap;
1596+
///
15921597
/// let mut map = HashMap::new();
15931598
/// map.insert("a", 1i);
15941599
/// map.insert("b", 2i);
@@ -1608,8 +1613,9 @@ impl<K: Eq + Hash<S>, V, S, H: Hasher<S>> HashMap<K, V, H> {
16081613
///
16091614
/// # Example
16101615
///
1611-
/// ```rust
1612-
/// # use std::collections::HashMap;
1616+
/// ```
1617+
/// use std::collections::HashMap;
1618+
///
16131619
/// let mut map = HashMap::new();
16141620
/// map.insert("a", 1i);
16151621
/// map.insert("b", 2i);
@@ -1634,8 +1640,9 @@ impl<K: Eq + Hash<S>, V, S, H: Hasher<S>> HashMap<K, V, H> {
16341640
///
16351641
/// # Example
16361642
///
1637-
/// ```rust
1638-
/// # use std::collections::HashMap;
1643+
/// ```
1644+
/// use std::collections::HashMap;
1645+
///
16391646
/// let mut map = HashMap::new();
16401647
/// map.insert("a", 1i);
16411648
/// map.insert("b", 2i);
@@ -1654,8 +1661,9 @@ impl<K: Eq + Hash<S>, V: Clone, S, H: Hasher<S>> HashMap<K, V, H> {
16541661
///
16551662
/// # Example
16561663
///
1657-
/// ```rust
1658-
/// # use std::collections::HashMap;
1664+
/// ```
1665+
/// use std::collections::HashMap;
1666+
///
16591667
/// let mut map: HashMap<uint, String> = HashMap::new();
16601668
/// map.insert(1u, "foo".to_string());
16611669
/// let s: String = map.find_copy(&1u).unwrap();
@@ -1668,8 +1676,9 @@ impl<K: Eq + Hash<S>, V: Clone, S, H: Hasher<S>> HashMap<K, V, H> {
16681676
///
16691677
/// # Example
16701678
///
1671-
/// ```rust
1672-
/// # use std::collections::HashMap;
1679+
/// ```
1680+
/// use std::collections::HashMap;
1681+
///
16731682
/// let mut map: HashMap<uint, String> = HashMap::new();
16741683
/// map.insert(1u, "foo".to_string());
16751684
/// let s: String = map.get_copy(&1u);
@@ -1763,7 +1772,7 @@ pub type SetMoveItems<K> =
17631772
///
17641773
/// # Example
17651774
///
1766-
/// ```rust
1775+
/// ```
17671776
/// use std::collections::HashSet;
17681777
///
17691778
/// // Type inference lets us omit an explicit type signature (which
@@ -1826,7 +1835,6 @@ impl<T: Hash + Eq> HashSet<T, RandomSipHasher> {
18261835
///
18271836
/// # Example
18281837
///
1829-
/// ```rust
18301838
/// use std::collections::HashSet;
18311839
/// let mut set: HashSet<int> = HashSet::new();
18321840
/// ```
@@ -1840,7 +1848,6 @@ impl<T: Hash + Eq> HashSet<T, RandomSipHasher> {
18401848
///
18411849
/// # Example
18421850
///
1843-
/// ```rust
18441851
/// use std::collections::HashSet;
18451852
/// let mut set: HashSet<int> = HashSet::with_capacity(10);
18461853
/// ```
@@ -1898,7 +1905,6 @@ impl<T: Eq + Hash<S>, S, H: Hasher<S>> HashSet<T, H> {
18981905
///
18991906
/// # Example
19001907
///
1901-
/// ```rust
19021908
/// use std::collections::HashSet;
19031909
/// let mut set: HashSet<int> = HashSet::new();
19041910
/// set.reserve(10);
@@ -1957,9 +1963,8 @@ impl<T: Eq + Hash<S>, S, H: Hasher<S>> HashSet<T, H> {
19571963
///
19581964
/// # Example
19591965
///
1960-
/// ```rust
1966+
/// ```
19611967
/// use std::collections::HashSet;
1962-
///
19631968
/// let mut set = HashSet::new();
19641969
/// set.insert("a");
19651970
/// set.insert("b");
@@ -1979,9 +1984,8 @@ impl<T: Eq + Hash<S>, S, H: Hasher<S>> HashSet<T, H> {
19791984
///
19801985
/// # Example
19811986
///
1982-
/// ```rust
1987+
/// ```
19831988
/// use std::collections::HashSet;
1984-
///
19851989
/// let mut set = HashSet::new();
19861990
/// set.insert("a".to_string());
19871991
/// set.insert("b".to_string());
@@ -2002,9 +2006,8 @@ impl<T: Eq + Hash<S>, S, H: Hasher<S>> HashSet<T, H> {
20022006
///
20032007
/// # Example
20042008
///
2005-
/// ```rust
2009+
/// ```
20062010
/// use std::collections::HashSet;
2007-
///
20082011
/// let a: HashSet<int> = [1i, 2, 3].iter().map(|&x| x).collect();
20092012
/// let b: HashSet<int> = [4i, 2, 3, 4].iter().map(|&x| x).collect();
20102013
///
@@ -2032,9 +2035,8 @@ impl<T: Eq + Hash<S>, S, H: Hasher<S>> HashSet<T, H> {
20322035
///
20332036
/// # Example
20342037
///
2035-
/// ```rust
2038+
/// ```
20362039
/// use std::collections::HashSet;
2037-
///
20382040
/// let a: HashSet<int> = [1i, 2, 3].iter().map(|&x| x).collect();
20392041
/// let b: HashSet<int> = [4i, 2, 3, 4].iter().map(|&x| x).collect();
20402042
///
@@ -2058,9 +2060,8 @@ impl<T: Eq + Hash<S>, S, H: Hasher<S>> HashSet<T, H> {
20582060
///
20592061
/// # Example
20602062
///
2061-
/// ```rust
2063+
/// ```
20622064
/// use std::collections::HashSet;
2063-
///
20642065
/// let a: HashSet<int> = [1i, 2, 3].iter().map(|&x| x).collect();
20652066
/// let b: HashSet<int> = [4i, 2, 3, 4].iter().map(|&x| x).collect();
20662067
///
@@ -2084,9 +2085,8 @@ impl<T: Eq + Hash<S>, S, H: Hasher<S>> HashSet<T, H> {
20842085
///
20852086
/// # Example
20862087
///
2087-
/// ```rust
2088+
/// ```
20882089
/// use std::collections::HashSet;
2089-
///
20902090
/// let a: HashSet<int> = [1i, 2, 3].iter().map(|&x| x).collect();
20912091
/// let b: HashSet<int> = [4i, 2, 3, 4].iter().map(|&x| x).collect();
20922092
///

0 commit comments

Comments
 (0)