Make iteration order of named_variable_map, late_bound_vars_map, and resolve_bound_vars queries stable
This commit is contained in:
parent
d189d3efbc
commit
d4a4c1dd28
2 changed files with 5 additions and 5 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
use crate::ty;
|
use crate::ty;
|
||||||
|
|
||||||
use rustc_data_structures::fx::FxHashMap;
|
use rustc_data_structures::fx::FxIndexMap;
|
||||||
use rustc_errors::ErrorGuaranteed;
|
use rustc_errors::ErrorGuaranteed;
|
||||||
use rustc_hir::def_id::DefId;
|
use rustc_hir::def_id::DefId;
|
||||||
use rustc_hir::{ItemLocalId, OwnerId};
|
use rustc_hir::{ItemLocalId, OwnerId};
|
||||||
|
@ -51,7 +51,7 @@ pub enum ObjectLifetimeDefault {
|
||||||
pub struct ResolveBoundVars {
|
pub struct ResolveBoundVars {
|
||||||
/// Maps from every use of a named (not anonymous) lifetime to a
|
/// Maps from every use of a named (not anonymous) lifetime to a
|
||||||
/// `Region` describing how that region is bound
|
/// `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>>>,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1667,7 +1667,7 @@ rustc_queries! {
|
||||||
desc { "resolving lifetimes" }
|
desc { "resolving lifetimes" }
|
||||||
}
|
}
|
||||||
query named_variable_map(_: hir::OwnerId) ->
|
query named_variable_map(_: hir::OwnerId) ->
|
||||||
Option<&'tcx FxHashMap<ItemLocalId, ResolvedArg>> {
|
Option<&'tcx FxIndexMap<ItemLocalId, ResolvedArg>> {
|
||||||
desc { "looking up a named region" }
|
desc { "looking up a named region" }
|
||||||
}
|
}
|
||||||
query is_late_bound_map(_: hir::OwnerId) -> Option<&'tcx FxIndexSet<ItemLocalId>> {
|
query is_late_bound_map(_: hir::OwnerId) -> Option<&'tcx FxIndexSet<ItemLocalId>> {
|
||||||
|
@ -1683,7 +1683,7 @@ rustc_queries! {
|
||||||
separate_provide_extern
|
separate_provide_extern
|
||||||
}
|
}
|
||||||
query late_bound_vars_map(_: hir::OwnerId)
|
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" }
|
desc { "looking up late bound vars" }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue