Skip to content

Commit 43f08a4

Browse files
committed
Querify lookup_const_stability.
1 parent 4758e36 commit 43f08a4

File tree

2 files changed

+110
-185
lines changed

2 files changed

+110
-185
lines changed

compiler/rustc_middle/src/middle/stability.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use rustc_attr_data_structures::{
1010
use rustc_data_structures::unord::UnordMap;
1111
use rustc_errors::{Applicability, Diag, EmissionGuarantee};
1212
use rustc_feature::GateIssue;
13-
use rustc_hir::def_id::{DefId, LocalDefId, LocalDefIdMap};
13+
use rustc_hir::def_id::{DefId, LocalDefId};
1414
use rustc_hir::{self as hir, HirId};
1515
use rustc_macros::{Decodable, Encodable, HashStable, Subdiagnostic};
1616
use rustc_session::Session;
@@ -68,9 +68,6 @@ impl DeprecationEntry {
6868
/// A stability index, giving the stability level for items and methods.
6969
#[derive(HashStable, Debug)]
7070
pub struct Index {
71-
/// This is mostly a cache, except the stabilities of local items
72-
/// are filled by the annotator.
73-
pub const_stab_map: LocalDefIdMap<ConstStability>,
7471
/// Mapping from feature name to feature name based on the `implied_by` field of `#[unstable]`
7572
/// attributes. If a `#[unstable(feature = "implier", implied_by = "impliee")]` attribute
7673
/// exists, then this map will have a `impliee -> implier` entry.
@@ -86,12 +83,6 @@ pub struct Index {
8683
pub implications: UnordMap<Symbol, Symbol>,
8784
}
8885

89-
impl Index {
90-
pub fn local_const_stability(&self, def_id: LocalDefId) -> Option<ConstStability> {
91-
self.const_stab_map.get(&def_id).copied()
92-
}
93-
}
94-
9586
pub fn report_unstable(
9687
sess: &Session,
9788
feature: Symbol,

0 commit comments

Comments
 (0)