@@ -27,7 +27,9 @@ fn compute_ignored_attr_names() -> FxHashSet<Symbol> {
27
27
pub struct StableHashingContext < ' a > {
28
28
definitions : & ' a Definitions ,
29
29
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 ,
31
33
pub ( super ) body_resolver : BodyResolver < ' a > ,
32
34
// Very often, we are hashing something that does not need the
33
35
// `CachingSourceMapView`, so we initialize it lazily.
@@ -64,7 +66,7 @@ impl<'a> StableHashingContext<'a> {
64
66
body_resolver : BodyResolver :: Forbidden ,
65
67
definitions,
66
68
cstore,
67
- sess,
69
+ incremental_ignore_spans : sess. opts . debugging_opts . incremental_ignore_spans ,
68
70
caching_source_map : None ,
69
71
raw_source_map : sess. source_map ( ) ,
70
72
hashing_controls : HashingControls {
@@ -181,6 +183,7 @@ impl<'a> StableHashingContext<'a> {
181
183
IGNORED_ATTRIBUTES . with ( |attrs| attrs. contains ( & name) )
182
184
}
183
185
186
+ #[ inline]
184
187
pub fn hashing_controls ( & self ) -> HashingControls {
185
188
self . hashing_controls . clone ( )
186
189
}
@@ -201,7 +204,7 @@ impl<'a> rustc_span::HashStableContext for StableHashingContext<'a> {
201
204
202
205
#[ inline]
203
206
fn debug_opts_incremental_ignore_spans ( & self ) -> bool {
204
- self . sess . opts . debugging_opts . incremental_ignore_spans
207
+ self . incremental_ignore_spans
205
208
}
206
209
207
210
#[ inline]
0 commit comments