@@ -21,7 +21,7 @@ use rustc_hir::definitions::{DefKey, DefPath, DefPathData, DefPathHash};
2121use rustc_hir:: diagnostic_items:: DiagnosticItems ;
2222use rustc_hir:: lang_items;
2323use rustc_index:: vec:: { Idx , IndexVec } ;
24- use rustc_middle:: hir :: exports :: Export ;
24+ use rustc_middle:: metadata :: ModChild ;
2525use rustc_middle:: middle:: exported_symbols:: { ExportedSymbol , SymbolExportLevel } ;
2626use rustc_middle:: mir:: interpret:: { AllocDecodingSession , AllocDecodingState } ;
2727use rustc_middle:: mir:: { self , Body , Promoted } ;
@@ -1082,7 +1082,7 @@ impl<'a, 'tcx> CrateMetadataRef<'a> {
10821082 fn for_each_module_child (
10831083 & self ,
10841084 id : DefIndex ,
1085- mut callback : impl FnMut ( Export ) ,
1085+ mut callback : impl FnMut ( ModChild ) ,
10861086 sess : & Session ,
10871087 ) {
10881088 if let Some ( data) = & self . root . proc_macro_data {
@@ -1096,7 +1096,12 @@ impl<'a, 'tcx> CrateMetadataRef<'a> {
10961096 self . local_def_id ( def_index) ,
10971097 ) ;
10981098 let ident = self . item_ident ( def_index, sess) ;
1099- callback ( Export { ident, res, vis : ty:: Visibility :: Public , span : ident. span } ) ;
1099+ callback ( ModChild {
1100+ ident,
1101+ res,
1102+ vis : ty:: Visibility :: Public ,
1103+ span : ident. span ,
1104+ } ) ;
11001105 }
11011106 }
11021107 return ;
@@ -1117,7 +1122,7 @@ impl<'a, 'tcx> CrateMetadataRef<'a> {
11171122 let vis = self . get_visibility ( child_index) ;
11181123 let span = self . get_span ( child_index, sess) ;
11191124
1120- callback ( Export { ident, res, vis, span } ) ;
1125+ callback ( ModChild { ident, res, vis, span } ) ;
11211126
11221127 // For non-re-export structs and variants add their constructors to children.
11231128 // Re-export lists automatically contain constructors when necessary.
@@ -1129,7 +1134,7 @@ impl<'a, 'tcx> CrateMetadataRef<'a> {
11291134 let ctor_res =
11301135 Res :: Def ( DefKind :: Ctor ( CtorOf :: Struct , ctor_kind) , ctor_def_id) ;
11311136 let vis = self . get_visibility ( ctor_def_id. index ) ;
1132- callback ( Export { res : ctor_res, vis, ident , span } ) ;
1137+ callback ( ModChild { ident , res : ctor_res, vis, span } ) ;
11331138 }
11341139 }
11351140 DefKind :: Variant => {
@@ -1154,7 +1159,7 @@ impl<'a, 'tcx> CrateMetadataRef<'a> {
11541159 vis = ty:: Visibility :: Restricted ( crate_def_id) ;
11551160 }
11561161 }
1157- callback ( Export { res : ctor_res, ident , vis, span } ) ;
1162+ callback ( ModChild { ident , res : ctor_res, vis, span } ) ;
11581163 }
11591164 _ => { }
11601165 }
0 commit comments