@@ -653,7 +653,7 @@ impl<'a, 'tcx> CrateMetadata {
653
653
}
654
654
655
655
/// 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 )
657
657
where F : FnMut ( def:: Export )
658
658
{
659
659
if let Some ( ref proc_macros) = self . proc_macros {
@@ -676,19 +676,19 @@ impl<'a, 'tcx> CrateMetadata {
676
676
// Find the item.
677
677
let item = match self . maybe_entry ( id) {
678
678
None => return ,
679
- Some ( item) => item. decode ( self ) ,
679
+ Some ( item) => item. decode ( ( self , sess ) ) ,
680
680
} ;
681
681
682
682
// Iterate over all children.
683
683
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 ) ) {
685
685
if macros_only {
686
686
continue
687
687
}
688
688
689
689
// Get the item.
690
690
if let Some ( child) = self . maybe_entry ( child_index) {
691
- let child = child. decode ( self ) ;
691
+ let child = child. decode ( ( self , sess ) ) ;
692
692
match child. kind {
693
693
EntryKind :: MacroDef ( ..) => { }
694
694
_ if macros_only => continue ,
@@ -699,12 +699,12 @@ impl<'a, 'tcx> CrateMetadata {
699
699
match child. kind {
700
700
// FIXME(eddyb) Don't encode these in children.
701
701
EntryKind :: ForeignMod => {
702
- for child_index in child. children . decode ( self ) {
702
+ for child_index in child. children . decode ( ( self , sess ) ) {
703
703
if let Some ( def) = self . get_def ( child_index) {
704
704
callback ( def:: Export {
705
705
def : def,
706
706
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 ) ) ,
708
708
} ) ;
709
709
}
710
710
}
@@ -717,7 +717,7 @@ impl<'a, 'tcx> CrateMetadata {
717
717
}
718
718
719
719
let def_key = self . def_key ( child_index) ;
720
- let span = child. span . decode ( self ) ;
720
+ let span = child. span . decode ( ( self , sess ) ) ;
721
721
if let ( Some ( def) , Some ( name) ) =
722
722
( self . get_def ( child_index) , def_key. disambiguated_data . data . get_opt_name ( ) ) {
723
723
let ident = Ident :: with_empty_ctxt ( name) ;
@@ -746,7 +746,7 @@ impl<'a, 'tcx> CrateMetadata {
746
746
}
747
747
748
748
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 ) ) {
750
750
match exp. def {
751
751
Def :: Macro ( ..) => { }
752
752
_ if macros_only => continue ,
0 commit comments