@@ -1364,9 +1364,9 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
13641364 record ! ( self . tables. params_in_repr[ def_id] <- params_in_repr) ;
13651365
13661366 if adt_def. is_enum ( ) {
1367- let module_children = tcx. module_children_non_reexports ( local_def_id) ;
1367+ let module_children = tcx. module_children_local ( local_def_id) ;
13681368 record_array ! ( self . tables. module_children_non_reexports[ def_id] <-
1369- module_children. iter( ) . map( |def_id| def_id. local_def_index ) ) ;
1369+ module_children. iter( ) . map( |child| child . res . def_id( ) . index ) ) ;
13701370 } else {
13711371 // For non-enum, there is only one variant, and its def_id is the adt's.
13721372 debug_assert_eq ! ( adt_def. variants( ) . len( ) , 1 ) ;
@@ -1412,12 +1412,14 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
14121412 // Encode this here because we don't do it in encode_def_ids.
14131413 record ! ( self . tables. expn_that_defined[ def_id] <- tcx. expn_that_defined( local_def_id) ) ;
14141414 } else {
1415- let non_reexports = tcx. module_children_non_reexports ( local_def_id) ;
1415+ let module_children = tcx. module_children_local ( local_def_id) ;
1416+
14161417 record_array ! ( self . tables. module_children_non_reexports[ def_id] <-
1417- non_reexports. iter( ) . map( |def_id| def_id. local_def_index) ) ;
1418+ module_children. iter( ) . filter( |child| child. reexport_chain. is_empty( ) )
1419+ . map( |child| child. res. def_id( ) . index) ) ;
14181420
14191421 record_defaulted_array ! ( self . tables. module_children_reexports[ def_id] <-
1420- tcx . module_children_reexports ( local_def_id ) ) ;
1422+ module_children . iter ( ) . filter ( |child| !child . reexport_chain . is_empty ( ) ) ) ;
14211423 }
14221424 }
14231425
@@ -1676,9 +1678,9 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
16761678 hir:: ItemKind :: Trait ( ..) => {
16771679 record ! ( self . tables. trait_def[ def_id] <- self . tcx. trait_def( def_id) ) ;
16781680
1679- let module_children = tcx. module_children_non_reexports ( item. owner_id . def_id ) ;
1681+ let module_children = tcx. module_children_local ( item. owner_id . def_id ) ;
16801682 record_array ! ( self . tables. module_children_non_reexports[ def_id] <-
1681- module_children. iter( ) . map( |def_id| def_id. local_def_index ) ) ;
1683+ module_children. iter( ) . map( |child| child . res . def_id( ) . index ) ) ;
16821684
16831685 let associated_item_def_ids = self . tcx . associated_item_def_ids ( def_id) ;
16841686 record_associated_item_def_ids ( self , associated_item_def_ids) ;
0 commit comments