origin: Option<HirId>,
}
+impl_stable_hash_for!(struct self::DeprecationEntry {
+ attr,
+ origin
+});
+
impl DeprecationEntry {
fn local(attr: Deprecation, id: HirId) -> DeprecationEntry {
DeprecationEntry {
active_features: FxHashSet<Symbol>,
}
+impl_stable_hash_for!(struct self::Index<'tcx> {
+ stab_map,
+ depr_map,
+ staged_api,
+ active_features
+});
+
// A private tree-walker for producing an Index.
struct Annotator<'a, 'tcx: 'a> {
tcx: TyCtxt<'a, 'tcx, 'tcx>,
},
feature: Symbol::intern("rustc_private"),
rustc_depr: None,
+ rustc_const_unstable: None,
});
annotator.parent_stab = Some(stability);
}
// compiler-generated `extern crate` items have a dummy span.
if item.span == DUMMY_SP { return }
- let hir_id = self.tcx.hir.node_to_hir_id(item.id);
- let cnum = match self.tcx.extern_mod_stmt_cnum(hir_id) {
+ let def_id = self.tcx.hir.local_def_id(item.id);
+ let cnum = match self.tcx.extern_mod_stmt_cnum(def_id) {
Some(cnum) => cnum,
None => return,
};
fn visit_path(&mut self, path: &'tcx hir::Path, id: ast::NodeId) {
match path.def {
+ Def::Local(..) | Def::Upvar(..) |
Def::PrimTy(..) | Def::SelfTy(..) | Def::Err => {}
_ => self.tcx.check_stability(path.def.def_id(), id, path.span)
}