Adjust assert_default_hashing_controls
This commit is contained in:
parent
5580e5e1dd
commit
560c90f5df
3 changed files with 22 additions and 6 deletions
|
@ -27,6 +27,7 @@ fn compute_ignored_attr_names() -> FxHashSet<Symbol> {
|
|||
pub struct StableHashingContext<'a> {
|
||||
definitions: &'a Definitions,
|
||||
cstore: &'a dyn CrateStore,
|
||||
sess: &'a Session,
|
||||
pub(super) body_resolver: BodyResolver<'a>,
|
||||
// Very often, we are hashing something that does not need the
|
||||
// `CachingSourceMapView`, so we initialize it lazily.
|
||||
|
@ -63,6 +64,7 @@ impl<'a> StableHashingContext<'a> {
|
|||
body_resolver: BodyResolver::Forbidden,
|
||||
definitions,
|
||||
cstore,
|
||||
sess,
|
||||
caching_source_map: None,
|
||||
raw_source_map: sess.source_map(),
|
||||
hashing_controls: HashingControls {
|
||||
|
@ -197,6 +199,11 @@ impl<'a> rustc_span::HashStableContext for StableHashingContext<'a> {
|
|||
self.hashing_controls.hash_spans
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn debug_opts_incremental_ignore_spans(&self) -> bool {
|
||||
self.sess.opts.debugging_opts.incremental_ignore_spans
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn def_path_hash(&self, def_id: DefId) -> DefPathHash {
|
||||
self.def_path_hash(def_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue