@@ -21,7 +21,7 @@ use rustc_hir::definitions::{DefKey, DefPath, DefPathData, DefPathHash};
21
21
use rustc_hir:: diagnostic_items:: DiagnosticItems ;
22
22
use rustc_hir:: lang_items;
23
23
use rustc_index:: vec:: { Idx , IndexVec } ;
24
- use rustc_middle:: hir :: exports :: Export ;
24
+ use rustc_middle:: metadata :: ModChild ;
25
25
use rustc_middle:: middle:: exported_symbols:: { ExportedSymbol , SymbolExportLevel } ;
26
26
use rustc_middle:: mir:: interpret:: { AllocDecodingSession , AllocDecodingState } ;
27
27
use rustc_middle:: mir:: { self , Body , Promoted } ;
@@ -1082,7 +1082,7 @@ impl<'a, 'tcx> CrateMetadataRef<'a> {
1082
1082
fn for_each_module_child (
1083
1083
& self ,
1084
1084
id : DefIndex ,
1085
- mut callback : impl FnMut ( Export ) ,
1085
+ mut callback : impl FnMut ( ModChild ) ,
1086
1086
sess : & Session ,
1087
1087
) {
1088
1088
if let Some ( data) = & self . root . proc_macro_data {
@@ -1096,7 +1096,12 @@ impl<'a, 'tcx> CrateMetadataRef<'a> {
1096
1096
self . local_def_id ( def_index) ,
1097
1097
) ;
1098
1098
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
+ } ) ;
1100
1105
}
1101
1106
}
1102
1107
return ;
@@ -1117,7 +1122,7 @@ impl<'a, 'tcx> CrateMetadataRef<'a> {
1117
1122
let vis = self . get_visibility ( child_index) ;
1118
1123
let span = self . get_span ( child_index, sess) ;
1119
1124
1120
- callback ( Export { ident, res, vis, span } ) ;
1125
+ callback ( ModChild { ident, res, vis, span } ) ;
1121
1126
1122
1127
// For non-re-export structs and variants add their constructors to children.
1123
1128
// Re-export lists automatically contain constructors when necessary.
@@ -1129,7 +1134,7 @@ impl<'a, 'tcx> CrateMetadataRef<'a> {
1129
1134
let ctor_res =
1130
1135
Res :: Def ( DefKind :: Ctor ( CtorOf :: Struct , ctor_kind) , ctor_def_id) ;
1131
1136
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 } ) ;
1133
1138
}
1134
1139
}
1135
1140
DefKind :: Variant => {
@@ -1154,7 +1159,7 @@ impl<'a, 'tcx> CrateMetadataRef<'a> {
1154
1159
vis = ty:: Visibility :: Restricted ( crate_def_id) ;
1155
1160
}
1156
1161
}
1157
- callback ( Export { res : ctor_res, ident , vis, span } ) ;
1162
+ callback ( ModChild { ident , res : ctor_res, vis, span } ) ;
1158
1163
}
1159
1164
_ => { }
1160
1165
}
0 commit comments