@@ -49,15 +49,13 @@ pub(super) enum BodyResolver<'tcx> {
4949
5050impl < ' a > StableHashingContext < ' a > {
5151 #[ inline]
52- fn new_with_or_without_spans (
52+ pub fn new (
5353 sess : & ' a Session ,
5454 definitions : & ' a Definitions ,
5555 cstore : & ' a dyn CrateStore ,
5656 source_span : & ' a IndexVec < LocalDefId , Span > ,
57- always_ignore_spans : bool ,
5857 ) -> 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 ;
6159
6260 StableHashingContext {
6361 body_resolver : BodyResolver :: Forbidden ,
@@ -71,33 +69,6 @@ impl<'a> StableHashingContext<'a> {
7169 }
7270 }
7371
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-
10172 #[ inline]
10273 pub fn without_hir_bodies ( & mut self , f : impl FnOnce ( & mut StableHashingContext < ' _ > ) ) {
10374 f ( & mut StableHashingContext { body_resolver : BodyResolver :: Ignore , ..self . clone ( ) } ) ;
@@ -202,10 +173,4 @@ impl<'a> rustc_span::HashStableContext for StableHashingContext<'a> {
202173 }
203174}
204175
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-
211176impl < ' a > rustc_session:: HashStableContext for StableHashingContext < ' a > { }
0 commit comments