Auto merge of #128711 - clarfonthey:default-iters-hash, r=dtolnay · qinheping/verify-rust-std@6b57e57 (original) (raw)
`@@ -1438,6 +1438,14 @@ impl<K, V> Clone for Iter<'_, K, V> {
`
1438
1438
`}
`
1439
1439
`}
`
1440
1440
``
``
1441
`+
#[stable(feature = "default_iters_hash", since = "CURRENT_RUSTC_VERSION")]
`
``
1442
`+
impl<K, V> Default for Iter<'_, K, V> {
`
``
1443
`+
#[inline]
`
``
1444
`+
fn default() -> Self {
`
``
1445
`+
Iter { base: Default::default() }
`
``
1446
`+
}
`
``
1447
`+
}
`
``
1448
+
1441
1449
`#[stable(feature = "std_debug", since = "1.16.0")]
`
1442
1450
`impl<K: Debug, V: Debug> fmt::Debug for Iter<'_, K, V> {
`
1443
1451
`fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
`
`@@ -1476,6 +1484,14 @@ impl<'a, K, V> IterMut<'a, K, V> {
`
1476
1484
`}
`
1477
1485
`}
`
1478
1486
``
``
1487
`+
#[stable(feature = "default_iters_hash", since = "CURRENT_RUSTC_VERSION")]
`
``
1488
`+
impl<K, V> Default for IterMut<'_, K, V> {
`
``
1489
`+
#[inline]
`
``
1490
`+
fn default() -> Self {
`
``
1491
`+
IterMut { base: Default::default() }
`
``
1492
`+
}
`
``
1493
`+
}
`
``
1494
+
1479
1495
`` /// An owning iterator over the entries of a HashMap
.
``
1480
1496
`///
`
1481
1497
`` /// This struct
is created by the [into_iter
] method on [HashMap
]
``
`@@ -1506,6 +1522,14 @@ impl<K, V> IntoIter<K, V> {
`
1506
1522
`}
`
1507
1523
`}
`
1508
1524
``
``
1525
`+
#[stable(feature = "default_iters_hash", since = "CURRENT_RUSTC_VERSION")]
`
``
1526
`+
impl<K, V> Default for IntoIter<K, V> {
`
``
1527
`+
#[inline]
`
``
1528
`+
fn default() -> Self {
`
``
1529
`+
IntoIter { base: Default::default() }
`
``
1530
`+
}
`
``
1531
`+
}
`
``
1532
+
1509
1533
`` /// An iterator over the keys of a HashMap
.
``
1510
1534
`///
`
1511
1535
`` /// This struct
is created by the [keys
] method on [HashMap
]. See its
``
`@@ -1538,6 +1562,14 @@ impl<K, V> Clone for Keys<'_, K, V> {
`
1538
1562
`}
`
1539
1563
`}
`
1540
1564
``
``
1565
`+
#[stable(feature = "default_iters_hash", since = "CURRENT_RUSTC_VERSION")]
`
``
1566
`+
impl<K, V> Default for Keys<'_, K, V> {
`
``
1567
`+
#[inline]
`
``
1568
`+
fn default() -> Self {
`
``
1569
`+
Keys { inner: Default::default() }
`
``
1570
`+
}
`
``
1571
`+
}
`
``
1572
+
1541
1573
`#[stable(feature = "std_debug", since = "1.16.0")]
`
1542
1574
`impl<K: Debug, V> fmt::Debug for Keys<'_, K, V> {
`
1543
1575
`fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
`
`@@ -1577,6 +1609,14 @@ impl<K, V> Clone for Values<'_, K, V> {
`
1577
1609
`}
`
1578
1610
`}
`
1579
1611
``
``
1612
`+
#[stable(feature = "default_iters_hash", since = "CURRENT_RUSTC_VERSION")]
`
``
1613
`+
impl<K, V> Default for Values<'_, K, V> {
`
``
1614
`+
#[inline]
`
``
1615
`+
fn default() -> Self {
`
``
1616
`+
Values { inner: Default::default() }
`
``
1617
`+
}
`
``
1618
`+
}
`
``
1619
+
1580
1620
`#[stable(feature = "std_debug", since = "1.16.0")]
`
1581
1621
`impl<K, V: Debug> fmt::Debug for Values<'_, K, V> {
`
1582
1622
`fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
`
`@@ -1665,6 +1705,14 @@ pub struct ValuesMut<'a, K: 'a, V: 'a> {
`
1665
1705
`inner: IterMut<'a, K, V>,
`
1666
1706
`}
`
1667
1707
``
``
1708
`+
#[stable(feature = "default_iters_hash", since = "CURRENT_RUSTC_VERSION")]
`
``
1709
`+
impl<K, V> Default for ValuesMut<'_, K, V> {
`
``
1710
`+
#[inline]
`
``
1711
`+
fn default() -> Self {
`
``
1712
`+
ValuesMut { inner: Default::default() }
`
``
1713
`+
}
`
``
1714
`+
}
`
``
1715
+
1668
1716
`` /// An owning iterator over the keys of a HashMap
.
``
1669
1717
`///
`
1670
1718
`` /// This struct
is created by the [into_keys
] method on [HashMap
].
``
`@@ -1687,6 +1735,14 @@ pub struct IntoKeys<K, V> {
`
1687
1735
`inner: IntoIter<K, V>,
`
1688
1736
`}
`
1689
1737
``
``
1738
`+
#[stable(feature = "default_iters_hash", since = "CURRENT_RUSTC_VERSION")]
`
``
1739
`+
impl<K, V> Default for IntoKeys<K, V> {
`
``
1740
`+
#[inline]
`
``
1741
`+
fn default() -> Self {
`
``
1742
`+
IntoKeys { inner: Default::default() }
`
``
1743
`+
}
`
``
1744
`+
}
`
``
1745
+
1690
1746
`` /// An owning iterator over the values of a HashMap
.
``
1691
1747
`///
`
1692
1748
`` /// This struct
is created by the [into_values
] method on [HashMap
].
``
`@@ -1709,6 +1765,14 @@ pub struct IntoValues<K, V> {
`
1709
1765
`inner: IntoIter<K, V>,
`
1710
1766
`}
`
1711
1767
``
``
1768
`+
#[stable(feature = "default_iters_hash", since = "CURRENT_RUSTC_VERSION")]
`
``
1769
`+
impl<K, V> Default for IntoValues<K, V> {
`
``
1770
`+
#[inline]
`
``
1771
`+
fn default() -> Self {
`
``
1772
`+
IntoValues { inner: Default::default() }
`
``
1773
`+
}
`
``
1774
`+
}
`
``
1775
+
1712
1776
`/// A builder for computing where in a HashMap a key-value pair would be stored.
`
1713
1777
`///
`
1714
1778
`` /// See the [HashMap::raw_entry_mut
] docs for usage examples.
``