@@ -1407,9 +1407,15 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
1407
1407
record ! ( self . tables. object_lifetime_default[ def_id] <- default ) ;
1408
1408
}
1409
1409
if let DefKind :: Trait = def_kind {
1410
+ record ! ( self . tables. trait_def[ def_id] <- self . tcx. trait_def( def_id) ) ;
1410
1411
record ! ( self . tables. super_predicates_of[ def_id] <- self . tcx. super_predicates_of( def_id) ) ;
1412
+
1413
+ let module_children = self . tcx . module_children_local ( local_id) ;
1414
+ record_array ! ( self . tables. module_children_non_reexports[ def_id] <-
1415
+ module_children. iter( ) . map( |child| child. res. def_id( ) . index) ) ;
1411
1416
}
1412
1417
if let DefKind :: TraitAlias = def_kind {
1418
+ record ! ( self . tables. trait_def[ def_id] <- self . tcx. trait_def( def_id) ) ;
1413
1419
record ! ( self . tables. super_predicates_of[ def_id] <- self . tcx. super_predicates_of( def_id) ) ;
1414
1420
record ! ( self . tables. implied_predicates_of[ def_id] <- self . tcx. implied_predicates_of( def_id) ) ;
1415
1421
}
@@ -1723,18 +1729,10 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
1723
1729
}
1724
1730
}
1725
1731
}
1726
- hir:: ItemKind :: Trait ( ..) => {
1727
- record ! ( self . tables. trait_def[ def_id] <- self . tcx. trait_def( def_id) ) ;
1728
-
1729
- let module_children = self . tcx . module_children_local ( item. owner_id . def_id ) ;
1730
- record_array ! ( self . tables. module_children_non_reexports[ def_id] <-
1731
- module_children. iter( ) . map( |child| child. res. def_id( ) . index) ) ;
1732
- }
1733
- hir:: ItemKind :: TraitAlias ( ..) => {
1734
- record ! ( self . tables. trait_def[ def_id] <- self . tcx. trait_def( def_id) ) ;
1735
- }
1736
1732
hir:: ItemKind :: ExternCrate ( _)
1737
1733
| hir:: ItemKind :: Use ( ..)
1734
+ | hir:: ItemKind :: Trait ( ..)
1735
+ | hir:: ItemKind :: TraitAlias ( ..)
1738
1736
| hir:: ItemKind :: Static ( ..)
1739
1737
| hir:: ItemKind :: Const ( ..)
1740
1738
| hir:: ItemKind :: Enum ( ..)
0 commit comments