@@ -653,7 +653,7 @@ impl<'a, 'tcx> CrateMetadata {
653653 }
654654
655655 /// Iterates over each child of the given item.
656- pub fn each_child_of_item < F > ( & self , id : DefIndex , mut callback : F )
656+ pub fn each_child_of_item < F > ( & self , id : DefIndex , mut callback : F , sess : & Session )
657657 where F : FnMut ( def:: Export )
658658 {
659659 if let Some ( ref proc_macros) = self . proc_macros {
@@ -676,19 +676,19 @@ impl<'a, 'tcx> CrateMetadata {
676676 // Find the item.
677677 let item = match self . maybe_entry ( id) {
678678 None => return ,
679- Some ( item) => item. decode ( self ) ,
679+ Some ( item) => item. decode ( ( self , sess ) ) ,
680680 } ;
681681
682682 // Iterate over all children.
683683 let macros_only = self . dep_kind . get ( ) . macros_only ( ) ;
684- for child_index in item. children . decode ( self ) {
684+ for child_index in item. children . decode ( ( self , sess ) ) {
685685 if macros_only {
686686 continue
687687 }
688688
689689 // Get the item.
690690 if let Some ( child) = self . maybe_entry ( child_index) {
691- let child = child. decode ( self ) ;
691+ let child = child. decode ( ( self , sess ) ) ;
692692 match child. kind {
693693 EntryKind :: MacroDef ( ..) => { }
694694 _ if macros_only => continue ,
@@ -699,12 +699,12 @@ impl<'a, 'tcx> CrateMetadata {
699699 match child. kind {
700700 // FIXME(eddyb) Don't encode these in children.
701701 EntryKind :: ForeignMod => {
702- for child_index in child. children . decode ( self ) {
702+ for child_index in child. children . decode ( ( self , sess ) ) {
703703 if let Some ( def) = self . get_def ( child_index) {
704704 callback ( def:: Export {
705705 def : def,
706706 ident : Ident :: with_empty_ctxt ( self . item_name ( child_index) ) ,
707- span : self . entry ( child_index) . span . decode ( self ) ,
707+ span : self . entry ( child_index) . span . decode ( ( self , sess ) ) ,
708708 } ) ;
709709 }
710710 }
@@ -717,7 +717,7 @@ impl<'a, 'tcx> CrateMetadata {
717717 }
718718
719719 let def_key = self . def_key ( child_index) ;
720- let span = child. span . decode ( self ) ;
720+ let span = child. span . decode ( ( self , sess ) ) ;
721721 if let ( Some ( def) , Some ( name) ) =
722722 ( self . get_def ( child_index) , def_key. disambiguated_data . data . get_opt_name ( ) ) {
723723 let ident = Ident :: with_empty_ctxt ( name) ;
@@ -746,7 +746,7 @@ impl<'a, 'tcx> CrateMetadata {
746746 }
747747
748748 if let EntryKind :: Mod ( data) = item. kind {
749- for exp in data. decode ( self ) . reexports . decode ( self ) {
749+ for exp in data. decode ( ( self , sess ) ) . reexports . decode ( ( self , sess ) ) {
750750 match exp. def {
751751 Def :: Macro ( ..) => { }
752752 _ if macros_only => continue ,
0 commit comments