Skip to content

Commit d189d3e

Browse files
Make iteration order of stability_index query stable
1 parent 762e21f commit d189d3e

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

compiler/rustc_middle/src/middle/stability.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@ use rustc_ast::NodeId;
88
use rustc_attr::{
99
self as attr, ConstStability, DefaultBodyStability, DeprecatedSince, Deprecation, Stability,
1010
};
11-
use rustc_data_structures::fx::FxHashMap;
1211
use rustc_data_structures::unord::UnordMap;
1312
use rustc_errors::{Applicability, Diagnostic};
1413
use rustc_feature::GateIssue;
1514
use rustc_hir::def::DefKind;
16-
use rustc_hir::def_id::{DefId, LocalDefId};
15+
use rustc_hir::def_id::{DefId, LocalDefId, LocalDefIdMap};
1716
use rustc_hir::{self as hir, HirId};
1817
use rustc_middle::ty::print::with_no_trimmed_paths;
1918
use rustc_session::lint::builtin::{DEPRECATED, DEPRECATED_IN_FUTURE, SOFT_UNSTABLE};
@@ -62,10 +61,10 @@ impl DeprecationEntry {
6261
pub struct Index {
6362
/// This is mostly a cache, except the stabilities of local items
6463
/// are filled by the annotator.
65-
pub stab_map: FxHashMap<LocalDefId, Stability>,
66-
pub const_stab_map: FxHashMap<LocalDefId, ConstStability>,
67-
pub default_body_stab_map: FxHashMap<LocalDefId, DefaultBodyStability>,
68-
pub depr_map: FxHashMap<LocalDefId, DeprecationEntry>,
64+
pub stab_map: LocalDefIdMap<Stability>,
65+
pub const_stab_map: LocalDefIdMap<ConstStability>,
66+
pub default_body_stab_map: LocalDefIdMap<DefaultBodyStability>,
67+
pub depr_map: LocalDefIdMap<DeprecationEntry>,
6968
/// Mapping from feature name to feature name based on the `implied_by` field of `#[unstable]`
7069
/// attributes. If a `#[unstable(feature = "implier", implied_by = "impliee")]` attribute
7170
/// exists, then this map will have a `impliee -> implier` entry.

0 commit comments

Comments
 (0)