@@ -49,15 +49,13 @@ pub(super) enum BodyResolver<'tcx> {
49
49
50
50
impl < ' a > StableHashingContext < ' a > {
51
51
#[ inline]
52
- fn new_with_or_without_spans (
52
+ pub fn new (
53
53
sess : & ' a Session ,
54
54
definitions : & ' a Definitions ,
55
55
cstore : & ' a dyn CrateStore ,
56
56
source_span : & ' a IndexVec < LocalDefId , Span > ,
57
- always_ignore_spans : bool ,
58
57
) -> Self {
59
- let hash_spans_initial =
60
- !always_ignore_spans && !sess. opts . unstable_opts . incremental_ignore_spans ;
58
+ let hash_spans_initial = !sess. opts . unstable_opts . incremental_ignore_spans ;
61
59
62
60
StableHashingContext {
63
61
body_resolver : BodyResolver :: Forbidden ,
@@ -71,33 +69,6 @@ impl<'a> StableHashingContext<'a> {
71
69
}
72
70
}
73
71
74
- #[ inline]
75
- pub fn new (
76
- sess : & ' a Session ,
77
- definitions : & ' a Definitions ,
78
- cstore : & ' a dyn CrateStore ,
79
- source_span : & ' a IndexVec < LocalDefId , Span > ,
80
- ) -> Self {
81
- Self :: new_with_or_without_spans (
82
- sess,
83
- definitions,
84
- cstore,
85
- source_span,
86
- /*always_ignore_spans=*/ false ,
87
- )
88
- }
89
-
90
- #[ inline]
91
- pub fn ignore_spans (
92
- sess : & ' a Session ,
93
- definitions : & ' a Definitions ,
94
- cstore : & ' a dyn CrateStore ,
95
- source_span : & ' a IndexVec < LocalDefId , Span > ,
96
- ) -> Self {
97
- let always_ignore_spans = true ;
98
- Self :: new_with_or_without_spans ( sess, definitions, cstore, source_span, always_ignore_spans)
99
- }
100
-
101
72
#[ inline]
102
73
pub fn without_hir_bodies ( & mut self , f : impl FnOnce ( & mut StableHashingContext < ' _ > ) ) {
103
74
f ( & mut StableHashingContext { body_resolver : BodyResolver :: Ignore , ..self . clone ( ) } ) ;
@@ -202,10 +173,4 @@ impl<'a> rustc_span::HashStableContext for StableHashingContext<'a> {
202
173
}
203
174
}
204
175
205
- impl < ' a > rustc_data_structures:: intern:: InternedHashingContext for StableHashingContext < ' a > {
206
- fn with_def_path_and_no_spans ( & mut self , f : impl FnOnce ( & mut Self ) ) {
207
- self . while_hashing_spans ( false , f) ;
208
- }
209
- }
210
-
211
176
impl < ' a > rustc_session:: HashStableContext for StableHashingContext < ' a > { }
0 commit comments