@@ -22,7 +22,7 @@ use rustc_span::hygiene::{ExpnId, SyntaxContext};
22
22
use rustc_span:: source_map:: { SourceMap , StableSourceFileId } ;
23
23
use rustc_span:: { BytePos , SourceFile , Span , DUMMY_SP } ;
24
24
use std:: mem;
25
- use syntax:: ast:: { Ident , NodeId } ;
25
+ use syntax:: ast:: Ident ;
26
26
27
27
const TAG_FILE_FOOTER : u128 = 0xC0FFEE_C0FFEE_C0FFEE_C0FFEE_C0FFEE ;
28
28
@@ -680,16 +680,6 @@ impl<'a, 'tcx> SpecializedDecoder<hir::HirId> for CacheDecoder<'a, 'tcx> {
680
680
}
681
681
}
682
682
683
- // `NodeId`s are not stable across compilation sessions, so we store them in their
684
- // `HirId` representation. This allows use to map them to the current `NodeId`.
685
- impl < ' a , ' tcx > SpecializedDecoder < NodeId > for CacheDecoder < ' a , ' tcx > {
686
- #[ inline]
687
- fn specialized_decode ( & mut self ) -> Result < NodeId , Self :: Error > {
688
- let hir_id = hir:: HirId :: decode ( self ) ?;
689
- Ok ( self . tcx ( ) . hir ( ) . hir_to_node_id ( hir_id) )
690
- }
691
- }
692
-
693
683
impl < ' a , ' tcx > SpecializedDecoder < Fingerprint > for CacheDecoder < ' a , ' tcx > {
694
684
fn specialized_decode ( & mut self ) -> Result < Fingerprint , Self :: Error > {
695
685
Fingerprint :: decode_opaque ( & mut self . opaque )
@@ -928,19 +918,6 @@ where
928
918
}
929
919
}
930
920
931
- // `NodeId`s are not stable across compilation sessions, so we store them in their
932
- // `HirId` representation. This allows use to map them to the current `NodeId`.
933
- impl < ' a , ' tcx , E > SpecializedEncoder < NodeId > for CacheEncoder < ' a , ' tcx , E >
934
- where
935
- E : ' a + TyEncoder ,
936
- {
937
- #[ inline]
938
- fn specialized_encode ( & mut self , node_id : & NodeId ) -> Result < ( ) , Self :: Error > {
939
- let hir_id = self . tcx . hir ( ) . node_to_hir_id ( * node_id) ;
940
- hir_id. encode ( self )
941
- }
942
- }
943
-
944
921
impl < ' a , ' tcx > SpecializedEncoder < Fingerprint > for CacheEncoder < ' a , ' tcx , opaque:: Encoder > {
945
922
fn specialized_encode ( & mut self , f : & Fingerprint ) -> Result < ( ) , Self :: Error > {
946
923
f. encode_opaque ( & mut self . encoder )
0 commit comments