Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron1011 authored and michaelwoerister committed Feb 21, 2022
1 parent 067f119 commit 62afddb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions compiler/rustc_query_system/src/ich/hcx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ fn compute_ignored_attr_names() -> FxHashSet<Symbol> {
pub struct StableHashingContext<'a> {
definitions: &'a Definitions,
cstore: &'a dyn CrateStore,
sess: &'a Session,
// The value of `-Z incremental-ignore-spans`.
// This field should only be used by `debug_opts_incremental_ignore_span`
incremental_ignore_spans: bool,
pub(super) body_resolver: BodyResolver<'a>,
// Very often, we are hashing something that does not need the
// `CachingSourceMapView`, so we initialize it lazily.
Expand Down Expand Up @@ -64,7 +66,7 @@ impl<'a> StableHashingContext<'a> {
body_resolver: BodyResolver::Forbidden,
definitions,
cstore,
sess,
incremental_ignore_spans: sess.opts.debugging_opts.incremental_ignore_spans,
caching_source_map: None,
raw_source_map: sess.source_map(),
hashing_controls: HashingControls {
Expand Down Expand Up @@ -181,6 +183,7 @@ impl<'a> StableHashingContext<'a> {
IGNORED_ATTRIBUTES.with(|attrs| attrs.contains(&name))
}

#[inline]
pub fn hashing_controls(&self) -> HashingControls {
self.hashing_controls.clone()
}
Expand All @@ -201,7 +204,7 @@ impl<'a> rustc_span::HashStableContext for StableHashingContext<'a> {

#[inline]
fn debug_opts_incremental_ignore_spans(&self) -> bool {
self.sess.opts.debugging_opts.incremental_ignore_spans
self.incremental_ignore_spans
}

#[inline]
Expand Down

0 comments on commit 62afddb

Please sign in to comment.