@@ -1364,9 +1364,9 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
1364
1364
record ! ( self . tables. params_in_repr[ def_id] <- params_in_repr) ;
1365
1365
1366
1366
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) ;
1368
1368
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 ) ) ;
1370
1370
} else {
1371
1371
// For non-enum, there is only one variant, and its def_id is the adt's.
1372
1372
debug_assert_eq ! ( adt_def. variants( ) . len( ) , 1 ) ;
@@ -1412,12 +1412,14 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
1412
1412
// Encode this here because we don't do it in encode_def_ids.
1413
1413
record ! ( self . tables. expn_that_defined[ def_id] <- tcx. expn_that_defined( local_def_id) ) ;
1414
1414
} 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
+
1416
1417
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) ) ;
1418
1420
1419
1421
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 ( ) ) ) ;
1421
1423
}
1422
1424
}
1423
1425
@@ -1676,9 +1678,9 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
1676
1678
hir:: ItemKind :: Trait ( ..) => {
1677
1679
record ! ( self . tables. trait_def[ def_id] <- self . tcx. trait_def( def_id) ) ;
1678
1680
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 ) ;
1680
1682
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 ) ) ;
1682
1684
1683
1685
let associated_item_def_ids = self . tcx . associated_item_def_ids ( def_id) ;
1684
1686
record_associated_item_def_ids ( self , associated_item_def_ids) ;
0 commit comments