about summary refs log tree commit diff
path: root/compiler/rustc_borrowck
diff options
context:
space:
mode:
authoryukang <moorekang@gmail.com>2024-02-11 19:50:50 +0800
committeryukang <moorekang@gmail.com>2024-02-14 18:36:37 +0800
commit3f27e4b3ea35c87c1e8a6b9b8a3c7e122f6299de (patch)
treeec5e00a1b03dfa35e7da6b6bff274552468206a2 /compiler/rustc_borrowck
parentb381d3ab27f788f990551100c4425bb782d26d76 (diff)
downloadrust-3f27e4b3ea35c87c1e8a6b9b8a3c7e122f6299de.tar.gz
rust-3f27e4b3ea35c87c1e8a6b9b8a3c7e122f6299de.zip
clean up potential_query_instability with FxIndexMap and UnordMap
Diffstat (limited to 'compiler/rustc_borrowck')
-rw-r--r--compiler/rustc_borrowck/src/universal_regions.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/compiler/rustc_borrowck/src/universal_regions.rs b/compiler/rustc_borrowck/src/universal_regions.rs
index a7bdfa4eae7..90e8f1b93b2 100644
--- a/compiler/rustc_borrowck/src/universal_regions.rs
+++ b/compiler/rustc_borrowck/src/universal_regions.rs
@@ -15,7 +15,7 @@
 #![allow(rustc::diagnostic_outside_of_impl)]
 #![allow(rustc::untranslatable_diagnostic)]
 
-use rustc_data_structures::fx::FxHashMap;
+use rustc_data_structures::fx::FxIndexMap;
 use rustc_errors::Diagnostic;
 use rustc_hir::def_id::{DefId, LocalDefId};
 use rustc_hir::lang_items::LangItem;
@@ -180,7 +180,7 @@ struct UniversalRegionIndices<'tcx> {
     /// basically equivalent to an `GenericArgs`, except that it also
     /// contains an entry for `ReStatic` -- it might be nice to just
     /// use an args, and then handle `ReStatic` another way.
-    indices: FxHashMap<ty::Region<'tcx>, RegionVid>,
+    indices: FxIndexMap<ty::Region<'tcx>, RegionVid>,
 
     /// The vid assigned to `'static`. Used only for diagnostics.
     pub fr_static: RegionVid,
@@ -325,9 +325,6 @@ impl<'tcx> UniversalRegions<'tcx> {
     }
 
     /// Gets an iterator over all the early-bound regions that have names.
-    /// Iteration order may be unstable, so this should only be used when
-    /// iteration order doesn't affect anything
-    #[allow(rustc::potential_query_instability)]
     pub fn named_universal_regions<'s>(
         &'s self,
     ) -> impl Iterator<Item = (ty::Region<'tcx>, ty::RegionVid)> + 's {