diff options
| author | Michael Woerister <michaelwoerister@posteo> | 2023-12-21 11:18:03 +0100 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@posteo> | 2024-01-04 13:37:21 +0100 |
| commit | d189d3efbc097a36e8d91cf94768ffc87c1b50bb (patch) | |
| tree | 42f18f483029d8fd20c2fa21a30294024e1fb774 /compiler/rustc_middle/src | |
| parent | 762e21f8c1664339cfd17eaabc0c229945c1be9f (diff) | |
| download | rust-d189d3efbc097a36e8d91cf94768ffc87c1b50bb.tar.gz rust-d189d3efbc097a36e8d91cf94768ffc87c1b50bb.zip | |
Make iteration order of stability_index query stable
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/middle/stability.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/compiler/rustc_middle/src/middle/stability.rs b/compiler/rustc_middle/src/middle/stability.rs index 04b5af4d8a7..90b479cf2f4 100644 --- a/compiler/rustc_middle/src/middle/stability.rs +++ b/compiler/rustc_middle/src/middle/stability.rs @@ -8,12 +8,11 @@ use rustc_ast::NodeId; use rustc_attr::{ self as attr, ConstStability, DefaultBodyStability, DeprecatedSince, Deprecation, Stability, }; -use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::unord::UnordMap; use rustc_errors::{Applicability, Diagnostic}; use rustc_feature::GateIssue; use rustc_hir::def::DefKind; -use rustc_hir::def_id::{DefId, LocalDefId}; +use rustc_hir::def_id::{DefId, LocalDefId, LocalDefIdMap}; use rustc_hir::{self as hir, HirId}; use rustc_middle::ty::print::with_no_trimmed_paths; use rustc_session::lint::builtin::{DEPRECATED, DEPRECATED_IN_FUTURE, SOFT_UNSTABLE}; @@ -62,10 +61,10 @@ impl DeprecationEntry { pub struct Index { /// This is mostly a cache, except the stabilities of local items /// are filled by the annotator. - pub stab_map: FxHashMap<LocalDefId, Stability>, - pub const_stab_map: FxHashMap<LocalDefId, ConstStability>, - pub default_body_stab_map: FxHashMap<LocalDefId, DefaultBodyStability>, - pub depr_map: FxHashMap<LocalDefId, DeprecationEntry>, + pub stab_map: LocalDefIdMap<Stability>, + pub const_stab_map: LocalDefIdMap<ConstStability>, + pub default_body_stab_map: LocalDefIdMap<DefaultBodyStability>, + pub depr_map: LocalDefIdMap<DeprecationEntry>, /// Mapping from feature name to feature name based on the `implied_by` field of `#[unstable]` /// attributes. If a `#[unstable(feature = "implier", implied_by = "impliee")]` attribute /// exists, then this map will have a `impliee -> implier` entry. |
