@@ -23,7 +23,7 @@ use std::mem;
2323use syntax:: ast:: NodeId ;
2424use syntax:: source_map:: { SourceMap , StableSourceFileId } ;
2525use syntax_pos:: { BytePos , Span , DUMMY_SP , SourceFile } ;
26- use syntax_pos:: hygiene:: { ExpnId , SyntaxContext , ExpnData } ;
26+ use syntax_pos:: hygiene:: { ExpnId , SyntaxContext } ;
2727
2828const TAG_FILE_FOOTER : u128 = 0xC0FFEE_C0FFEE_C0FFEE_C0FFEE_C0FFEE ;
2929
@@ -593,8 +593,8 @@ impl<'a, 'tcx> SpecializedDecoder<Span> for CacheDecoder<'a, 'tcx> {
593593 // don't seem to be used after HIR lowering, so everything should be fine
594594 // as long as incremental compilation does not kick in before that.
595595 let location = || Span :: with_root_ctxt ( lo, hi) ;
596- let recover_from_expn_data = |this : & Self , expn_data, pos| {
597- let span = location ( ) . fresh_expansion ( expn_data) ;
596+ let recover_from_expn_data = |this : & Self , expn_data, transparency , pos| {
597+ let span = location ( ) . fresh_expansion_with_transparency ( expn_data, transparency ) ;
598598 this. synthetic_syntax_contexts . borrow_mut ( ) . insert ( pos, span. ctxt ( ) ) ;
599599 span
600600 } ;
@@ -603,9 +603,9 @@ impl<'a, 'tcx> SpecializedDecoder<Span> for CacheDecoder<'a, 'tcx> {
603603 location ( )
604604 }
605605 TAG_EXPN_DATA_INLINE => {
606- let expn_data = Decodable :: decode ( self ) ?;
606+ let ( expn_data, transparency ) = Decodable :: decode ( self ) ?;
607607 recover_from_expn_data (
608- self , expn_data, AbsoluteBytePos :: new ( self . opaque . position ( ) )
608+ self , expn_data, transparency , AbsoluteBytePos :: new ( self . opaque . position ( ) )
609609 )
610610 }
611611 TAG_EXPN_DATA_SHORTHAND => {
@@ -614,9 +614,9 @@ impl<'a, 'tcx> SpecializedDecoder<Span> for CacheDecoder<'a, 'tcx> {
614614 if let Some ( ctxt) = cached_ctxt {
615615 Span :: new ( lo, hi, ctxt)
616616 } else {
617- let expn_data =
618- self . with_position ( pos. to_usize ( ) , |this| ExpnData :: decode ( this) ) ?;
619- recover_from_expn_data ( self , expn_data, pos)
617+ let ( expn_data, transparency ) =
618+ self . with_position ( pos. to_usize ( ) , |this| Decodable :: decode ( this) ) ?;
619+ recover_from_expn_data ( self , expn_data, transparency , pos)
620620 }
621621 }
622622 _ => {
@@ -819,15 +819,15 @@ where
819819 if span_data. ctxt == SyntaxContext :: root ( ) {
820820 TAG_NO_EXPN_DATA . encode ( self )
821821 } else {
822- let ( expn_id, expn_data) = span_data. ctxt . outer_expn_with_data ( ) ;
822+ let ( expn_id, transparency , expn_data) = span_data. ctxt . outer_mark_with_data ( ) ;
823823 if let Some ( pos) = self . expn_data_shorthands . get ( & expn_id) . cloned ( ) {
824824 TAG_EXPN_DATA_SHORTHAND . encode ( self ) ?;
825825 pos. encode ( self )
826826 } else {
827827 TAG_EXPN_DATA_INLINE . encode ( self ) ?;
828828 let pos = AbsoluteBytePos :: new ( self . position ( ) ) ;
829829 self . expn_data_shorthands . insert ( expn_id, pos) ;
830- expn_data. encode ( self )
830+ ( expn_data, transparency ) . encode ( self )
831831 }
832832 }
833833 }
0 commit comments