diff options
| author | Michael Woerister <michaelwoerister@posteo> | 2023-12-21 11:30:01 +0100 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@posteo> | 2024-01-04 13:37:21 +0100 |
| commit | d4a4c1dd28469eb874d7d1c7a95bc9e25c67a286 (patch) | |
| tree | f0d00c90f61fd3443de2525fa9579b485edd43fb | |
| parent | d189d3efbc097a36e8d91cf94768ffc87c1b50bb (diff) | |
| download | rust-d4a4c1dd28469eb874d7d1c7a95bc9e25c67a286.tar.gz rust-d4a4c1dd28469eb874d7d1c7a95bc9e25c67a286.zip | |
Make iteration order of named_variable_map, late_bound_vars_map, and resolve_bound_vars queries stable
| -rw-r--r-- | compiler/rustc_middle/src/middle/resolve_bound_vars.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/query/mod.rs | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_middle/src/middle/resolve_bound_vars.rs b/compiler/rustc_middle/src/middle/resolve_bound_vars.rs index c59704fc023..610afd95f3c 100644 --- a/compiler/rustc_middle/src/middle/resolve_bound_vars.rs +++ b/compiler/rustc_middle/src/middle/resolve_bound_vars.rs @@ -2,7 +2,7 @@ use crate::ty; -use rustc_data_structures::fx::FxHashMap; +use rustc_data_structures::fx::FxIndexMap; use rustc_errors::ErrorGuaranteed; use rustc_hir::def_id::DefId; use rustc_hir::{ItemLocalId, OwnerId}; @@ -51,7 +51,7 @@ pub enum ObjectLifetimeDefault { pub struct ResolveBoundVars { /// Maps from every use of a named (not anonymous) lifetime to a /// `Region` describing how that region is bound - pub defs: FxHashMap<OwnerId, FxHashMap<ItemLocalId, ResolvedArg>>, + pub defs: FxIndexMap<OwnerId, FxIndexMap<ItemLocalId, ResolvedArg>>, - pub late_bound_vars: FxHashMap<OwnerId, FxHashMap<ItemLocalId, Vec<ty::BoundVariableKind>>>, + pub late_bound_vars: FxIndexMap<OwnerId, FxIndexMap<ItemLocalId, Vec<ty::BoundVariableKind>>>, } diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index 855574512bf..be10c7029e3 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -1667,7 +1667,7 @@ rustc_queries! { desc { "resolving lifetimes" } } query named_variable_map(_: hir::OwnerId) -> - Option<&'tcx FxHashMap<ItemLocalId, ResolvedArg>> { + Option<&'tcx FxIndexMap<ItemLocalId, ResolvedArg>> { desc { "looking up a named region" } } query is_late_bound_map(_: hir::OwnerId) -> Option<&'tcx FxIndexSet<ItemLocalId>> { @@ -1683,7 +1683,7 @@ rustc_queries! { separate_provide_extern } query late_bound_vars_map(_: hir::OwnerId) - -> Option<&'tcx FxHashMap<ItemLocalId, Vec<ty::BoundVariableKind>>> { + -> Option<&'tcx FxIndexMap<ItemLocalId, Vec<ty::BoundVariableKind>>> { desc { "looking up late bound vars" } } |
