-use crate::hir;
-use crate::hir::def_id::{DefId, DefIndex};
use crate::hir::map::definitions::Definitions;
use crate::hir::map::DefPathHash;
use crate::ich::{self, CachingSourceMapView};
use crate::session::Session;
use crate::ty::{fast_reject, TyCtxt};
-use std::cmp::Ord;
-
+use rustc_data_structures::fx::{FxHashMap, FxHashSet};
+use rustc_data_structures::stable_hasher::{HashStable, StableHasher, ToStableHashKey};
+use rustc_data_structures::sync::Lrc;
+use rustc_hir as hir;
+use rustc_hir::def_id::{DefId, DefIndex};
use rustc_span::source_map::SourceMap;
use rustc_span::symbol::Symbol;
use rustc_span::{BytePos, SourceFile};
use syntax::ast;
-use rustc_data_structures::fx::{FxHashMap, FxHashSet};
-use rustc_data_structures::stable_hasher::{HashStable, StableHasher, ToStableHashKey};
-use rustc_data_structures::sync::Lrc;
use smallvec::SmallVec;
+use std::cmp::Ord;
fn compute_ignored_attr_names() -> FxHashSet<Symbol> {
debug_assert!(ich::IGNORED_ATTRIBUTES.len() > 0);
self.hash_spans
}
+ #[inline]
+ fn hash_def_id(&mut self, def_id: DefId, hasher: &mut StableHasher) {
+ let hcx = self;
+ hcx.def_path_hash(def_id).hash_stable(hcx, hasher);
+ }
+
fn byte_pos_to_line_and_col(
&mut self,
byte: BytePos,