@@ -27,7 +27,9 @@ fn compute_ignored_attr_names() -> FxHashSet<Symbol> {
2727pub struct StableHashingContext < ' a > {
2828 definitions : & ' a Definitions ,
2929 cstore : & ' a dyn CrateStore ,
30- sess : & ' a Session ,
30+ // The value of `-Z incremental-ignore-spans`.
31+ // This field should only be used by `debug_opts_incremental_ignore_span`
32+ incremental_ignore_spans : bool ,
3133 pub ( super ) body_resolver : BodyResolver < ' a > ,
3234 // Very often, we are hashing something that does not need the
3335 // `CachingSourceMapView`, so we initialize it lazily.
@@ -64,7 +66,7 @@ impl<'a> StableHashingContext<'a> {
6466 body_resolver : BodyResolver :: Forbidden ,
6567 definitions,
6668 cstore,
67- sess,
69+ incremental_ignore_spans : sess. opts . debugging_opts . incremental_ignore_spans ,
6870 caching_source_map : None ,
6971 raw_source_map : sess. source_map ( ) ,
7072 hashing_controls : HashingControls {
@@ -181,6 +183,7 @@ impl<'a> StableHashingContext<'a> {
181183 IGNORED_ATTRIBUTES . with ( |attrs| attrs. contains ( & name) )
182184 }
183185
186+ #[ inline]
184187 pub fn hashing_controls ( & self ) -> HashingControls {
185188 self . hashing_controls . clone ( )
186189 }
@@ -201,7 +204,7 @@ impl<'a> rustc_span::HashStableContext for StableHashingContext<'a> {
201204
202205 #[ inline]
203206 fn debug_opts_incremental_ignore_spans ( & self ) -> bool {
204- self . sess . opts . debugging_opts . incremental_ignore_spans
207+ self . incremental_ignore_spans
205208 }
206209
207210 #[ inline]
0 commit comments