diff options
| author | bors <bors@rust-lang.org> | 2024-02-15 12:36:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-02-15 12:36:37 +0000 |
| commit | fa9f77ff35b4b63ed0cef9a9642c8f881b33f14f (patch) | |
| tree | 3960d1bfebde79b981e9ac87e62bbc65a1e792d9 /compiler/rustc_borrowck/src | |
| parent | 6a4222b5119bce8c24e74dd3ad44006ce0c803e6 (diff) | |
| parent | 3f27e4b3ea35c87c1e8a6b9b8a3c7e122f6299de (diff) | |
| download | rust-fa9f77ff35b4b63ed0cef9a9642c8f881b33f14f.tar.gz rust-fa9f77ff35b4b63ed0cef9a9642c8f881b33f14f.zip | |
Auto merge of #120931 - chenyukang:yukang-cleanup-hashmap, r=michaelwoerister
Clean up potential_query_instability with FxIndexMap and UnordMap From https://github.com/rust-lang/rust/pull/120485#issuecomment-1916437191 r? `@michaelwoerister`
Diffstat (limited to 'compiler/rustc_borrowck/src')
| -rw-r--r-- | compiler/rustc_borrowck/src/universal_regions.rs | 7 |
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 { |
