From 3f27e4b3ea35c87c1e8a6b9b8a3c7e122f6299de Mon Sep 17 00:00:00 2001 From: yukang Date: Sun, 11 Feb 2024 19:50:50 +0800 Subject: clean up potential_query_instability with FxIndexMap and UnordMap --- compiler/rustc_data_structures/src/unord.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'compiler/rustc_data_structures/src') diff --git a/compiler/rustc_data_structures/src/unord.rs b/compiler/rustc_data_structures/src/unord.rs index 907c866b3ed..a99e2062039 100644 --- a/compiler/rustc_data_structures/src/unord.rs +++ b/compiler/rustc_data_structures/src/unord.rs @@ -524,6 +524,11 @@ impl UnordMap { UnordItems(self.inner.into_iter()) } + #[inline] + pub fn keys(&self) -> UnordItems<&K, impl Iterator> { + UnordItems(self.inner.keys()) + } + /// Returns the entries of this map in stable sort order (as defined by `ToStableHashKey`). /// /// The `cache_sort_key` parameter controls if [slice::sort_by_cached_key] or -- cgit 1.4.1-3-g733a5