Skip to content

Commit 0e31f59

Browse files
committed
add missing potential_query_instability for keys and values in hashmap
1 parent b0f9117 commit 0e31f59

File tree

1 file changed

+3
-0
lines changed
  • std/src/collections/hash

1 file changed

+3
-0
lines changed

std/src/collections/hash/map.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ impl<K, V, S> HashMap<K, V, S> {
356356
///
357357
/// In the current implementation, iterating over keys takes O(capacity) time
358358
/// instead of O(len) because it internally visits empty buckets too.
359+
#[rustc_lint_query_instability]
359360
#[stable(feature = "rust1", since = "1.0.0")]
360361
pub fn keys(&self) -> Keys<'_, K, V> {
361362
Keys { inner: self.iter() }
@@ -417,6 +418,7 @@ impl<K, V, S> HashMap<K, V, S> {
417418
///
418419
/// In the current implementation, iterating over values takes O(capacity) time
419420
/// instead of O(len) because it internally visits empty buckets too.
421+
#[rustc_lint_query_instability]
420422
#[stable(feature = "rust1", since = "1.0.0")]
421423
pub fn values(&self) -> Values<'_, K, V> {
422424
Values { inner: self.iter() }
@@ -449,6 +451,7 @@ impl<K, V, S> HashMap<K, V, S> {
449451
///
450452
/// In the current implementation, iterating over values takes O(capacity) time
451453
/// instead of O(len) because it internally visits empty buckets too.
454+
#[rustc_lint_query_instability]
452455
#[stable(feature = "map_values_mut", since = "1.10.0")]
453456
pub fn values_mut(&mut self) -> ValuesMut<'_, K, V> {
454457
ValuesMut { inner: self.iter_mut() }

0 commit comments

Comments
 (0)