@@ -22,7 +22,7 @@ use rustc_span::hygiene::{ExpnId, SyntaxContext};
2222use rustc_span:: source_map:: { SourceMap , StableSourceFileId } ;
2323use rustc_span:: { BytePos , SourceFile , Span , DUMMY_SP } ;
2424use std:: mem;
25- use syntax:: ast:: { Ident , NodeId } ;
25+ use syntax:: ast:: Ident ;
2626
2727const TAG_FILE_FOOTER : u128 = 0xC0FFEE_C0FFEE_C0FFEE_C0FFEE_C0FFEE ;
2828
@@ -680,16 +680,6 @@ impl<'a, 'tcx> SpecializedDecoder<hir::HirId> for CacheDecoder<'a, 'tcx> {
680680 }
681681}
682682
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-
693683impl < ' a , ' tcx > SpecializedDecoder < Fingerprint > for CacheDecoder < ' a , ' tcx > {
694684 fn specialized_decode ( & mut self ) -> Result < Fingerprint , Self :: Error > {
695685 Fingerprint :: decode_opaque ( & mut self . opaque )
@@ -928,19 +918,6 @@ where
928918 }
929919}
930920
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-
944921impl < ' a , ' tcx > SpecializedEncoder < Fingerprint > for CacheEncoder < ' a , ' tcx , opaque:: Encoder > {
945922 fn specialized_encode ( & mut self , f : & Fingerprint ) -> Result < ( ) , Self :: Error > {
946923 f. encode_opaque ( & mut self . encoder )
0 commit comments