1
Fork 0

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?
This commit is contained in:
Guillaume Gomez 2024-01-30 16:57:51 +01:00 committed by GitHub
commit 27bc496564
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 55 additions and 7 deletions

View file

@ -267,6 +267,7 @@ impl CguReuseTracker {
fn check_expected_reuse(&self, sess: &Session) {
if let Some(ref data) = self.data {
#[allow(rustc::potential_query_instability)]
let mut keys = data.expected_reuse.keys().collect::<Vec<_>>();
keys.sort_unstable();
for cgu_name in keys {