about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-01-30 16:57:51 +0100
committerGitHub <noreply@github.com>2024-01-30 16:57:51 +0100
commit27bc49656462c48f3b98ac1d8ce2b06d446e5ad3 (patch)
tree6d35d2fb0886ceb2aa7858c88f7694ba2f1e9801 /compiler/rustc_trait_selection/src
parentf3f14726787b492cfc511fe76725613a963fa516 (diff)
parentad526d831e295facc198610a27350076aa5aa438 (diff)
downloadrust-27bc49656462c48f3b98ac1d8ce2b06d446e5ad3.tar.gz
rust-27bc49656462c48f3b98ac1d8ce2b06d446e5ad3.zip
Rollup merge of #120485 - chenyukang:yukang-add-query-instability-check, r=michaelwoerister
add missing potential_query_instability for keys and values in hashmap

From https://github.com/rust-lang/rust/pull/120435#discussion_r1468883787,

These API are also returning iterator, so we need add `potential_query_instability` for them?
Diffstat (limited to 'compiler/rustc_trait_selection/src')
-rw-r--r--compiler/rustc_trait_selection/src/traits/auto_trait.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/auto_trait.rs b/compiler/rustc_trait_selection/src/traits/auto_trait.rs
index c4344758574..0b9fb7b6fbc 100644
--- a/compiler/rustc_trait_selection/src/traits/auto_trait.rs
+++ b/compiler/rustc_trait_selection/src/traits/auto_trait.rs
@@ -513,6 +513,7 @@ impl<'tcx> AutoTraitFinder<'tcx> {
         }
 
         while !vid_map.is_empty() {
+            #[allow(rustc::potential_query_instability)]
             let target = *vid_map.keys().next().expect("Keys somehow empty");
             let deps = vid_map.remove(&target).expect("Entry somehow missing");