[Clippy] Swap iter_over_hash_type to use diagnostic items instead o… · qinheping/verify-rust-std@04bd505 (original) (raw)

`@@ -1393,6 +1393,7 @@ where

`

1393

1393

`/// let iter = map.iter();

`

1394

1394

```` /// ```


`1395`

`1395`

`#[stable(feature = "rust1", since = "1.0.0")]

`

``

`1396`

`+

#[cfg_attr(not(test), rustc_diagnostic_item = "hashmap_iter_ty")]

`

`1396`

`1397`

`pub struct Iter<'a, K: 'a, V: 'a> {

`

`1397`

`1398`

`base: base::Iter<'a, K, V>,

`

`1398`

`1399`

`}

`

`@@ -1431,6 +1432,7 @@ impl<K: Debug, V: Debug> fmt::Debug for Iter<'_, K, V> {

`

`1431`

`1432`

`/// let iter = map.iter_mut();

`

`1432`

`1433`

```` /// ```

1433

1434

`#[stable(feature = "rust1", since = "1.0.0")]

`

``

1435

`+

#[cfg_attr(not(test), rustc_diagnostic_item = "hashmap_iter_mut_ty")]

`

1434

1436

`pub struct IterMut<'a, K: 'a, V: 'a> {

`

1435

1437

`base: base::IterMut<'a, K, V>,

`

1436

1438

`}

`

`@@ -1491,6 +1493,7 @@ impl<K, V> IntoIter<K, V> {

`

1491

1493

`/// let iter_keys = map.keys();

`

1492

1494

```` /// ```


`1493`

`1495`

`#[stable(feature = "rust1", since = "1.0.0")]

`

``

`1496`

`+

#[cfg_attr(not(test), rustc_diagnostic_item = "hashmap_keys_ty")]

`

`1494`

`1497`

`pub struct Keys<'a, K: 'a, V: 'a> {

`

`1495`

`1498`

`inner: Iter<'a, K, V>,

`

`1496`

`1499`

`}

`

`@@ -1529,6 +1532,7 @@ impl<K: Debug, V> fmt::Debug for Keys<'_, K, V> {

`

`1529`

`1532`

`/// let iter_values = map.values();

`

`1530`

`1533`

```` /// ```

1531

1534

`#[stable(feature = "rust1", since = "1.0.0")]

`

``

1535

`+

#[cfg_attr(not(test), rustc_diagnostic_item = "hashmap_values_ty")]

`

1532

1536

`pub struct Values<'a, K: 'a, V: 'a> {

`

1533

1537

`inner: Iter<'a, K, V>,

`

1534

1538

`}

`

`@@ -1567,6 +1571,7 @@ impl<K, V: Debug> fmt::Debug for Values<'_, K, V> {

`

1567

1571

`/// let iter = map.drain();

`

1568

1572

```` /// ```


`1569`

`1573`

`#[stable(feature = "drain", since = "1.6.0")]

`

``

`1574`

`+

#[cfg_attr(not(test), rustc_diagnostic_item = "hashmap_drain_ty")]

`

`1570`

`1575`

`pub struct Drain<'a, K: 'a, V: 'a> {

`

`1571`

`1576`

`base: base::Drain<'a, K, V>,

`

`1572`

`1577`

`}

`

`@@ -1624,6 +1629,7 @@ where

`

`1624`

`1629`

`/// let iter_values = map.values_mut();

`

`1625`

`1630`

```` /// ```

1626

1631

`#[stable(feature = "map_values_mut", since = "1.10.0")]

`

``

1632

`+

#[cfg_attr(not(test), rustc_diagnostic_item = "hashmap_values_mut_ty")]

`

1627

1633

`pub struct ValuesMut<'a, K: 'a, V: 'a> {

`

1628

1634

`inner: IterMut<'a, K, V>,

`

1629

1635

`}

`