diff options
| author | yukang <moorekang@gmail.com> | 2024-02-11 19:50:50 +0800 |
|---|---|---|
| committer | yukang <moorekang@gmail.com> | 2024-02-14 18:36:37 +0800 |
| commit | 3f27e4b3ea35c87c1e8a6b9b8a3c7e122f6299de (patch) | |
| tree | ec5e00a1b03dfa35e7da6b6bff274552468206a2 /compiler/rustc_data_structures/src | |
| parent | b381d3ab27f788f990551100c4425bb782d26d76 (diff) | |
| download | rust-3f27e4b3ea35c87c1e8a6b9b8a3c7e122f6299de.tar.gz rust-3f27e4b3ea35c87c1e8a6b9b8a3c7e122f6299de.zip | |
clean up potential_query_instability with FxIndexMap and UnordMap
Diffstat (limited to 'compiler/rustc_data_structures/src')
| -rw-r--r-- | compiler/rustc_data_structures/src/unord.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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<K: Eq + Hash, V> UnordMap<K, V> { UnordItems(self.inner.into_iter()) } + #[inline] + pub fn keys(&self) -> UnordItems<&K, impl Iterator<Item = &K>> { + 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 |
