@@ -1367,7 +1367,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
13671367
13681368 if adt_def. is_enum ( ) {
13691369 let module_children = tcx. module_children_non_reexports ( local_def_id) ;
1370- record_array ! ( self . tables. children [ def_id] <-
1370+ record_array ! ( self . tables. module_children_non_reexports [ def_id] <-
13711371 module_children. iter( ) . map( |def_id| def_id. local_def_index) ) ;
13721372 } else {
13731373 // For non-enum, there is only one variant, and its def_id is the adt's.
@@ -1385,7 +1385,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
13851385 record ! ( self . tables. variant_data[ variant. def_id] <- data) ;
13861386
13871387 self . tables . constness . set_some ( variant. def_id . index , hir:: Constness :: Const ) ;
1388- record_array ! ( self . tables. children [ variant. def_id] <- variant. fields. iter( ) . map( |f| {
1388+ record_array ! ( self . tables. associated_item_or_field_def_ids [ variant. def_id] <- variant. fields. iter( ) . map( |f| {
13891389 assert!( f. did. is_local( ) ) ;
13901390 f. did. index
13911391 } ) ) ;
@@ -1415,7 +1415,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
14151415 record ! ( self . tables. expn_that_defined[ def_id] <- tcx. expn_that_defined( local_def_id) ) ;
14161416 } else {
14171417 let non_reexports = tcx. module_children_non_reexports ( local_def_id) ;
1418- record_array ! ( self . tables. children [ def_id] <-
1418+ record_array ! ( self . tables. module_children_non_reexports [ def_id] <-
14191419 non_reexports. iter( ) . map( |def_id| def_id. local_def_index) ) ;
14201420
14211421 record_defaulted_array ! ( self . tables. module_children_reexports[ def_id] <-
@@ -1617,7 +1617,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
16171617 debug ! ( "EncodeContext::encode_info_for_item({:?})" , def_id) ;
16181618
16191619 let record_associated_item_def_ids = |this : & mut Self , def_ids : & [ DefId ] | {
1620- record_array ! ( this. tables. children [ def_id] <- def_ids. iter( ) . map( |& def_id| {
1620+ record_array ! ( this. tables. associated_item_or_field_def_ids [ def_id] <- def_ids. iter( ) . map( |& def_id| {
16211621 assert!( def_id. is_local( ) ) ;
16221622 def_id. index
16231623 } ) )
@@ -1678,6 +1678,10 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
16781678 hir:: ItemKind :: Trait ( ..) => {
16791679 record ! ( self . tables. trait_def[ def_id] <- self . tcx. trait_def( def_id) ) ;
16801680
1681+ let module_children = tcx. module_children_non_reexports ( item. owner_id . def_id ) ;
1682+ record_array ! ( self . tables. module_children_non_reexports[ def_id] <-
1683+ module_children. iter( ) . map( |def_id| def_id. local_def_index) ) ;
1684+
16811685 let associated_item_def_ids = self . tcx . associated_item_def_ids ( def_id) ;
16821686 record_associated_item_def_ids ( self , associated_item_def_ids) ;
16831687 for & item_def_id in associated_item_def_ids {
0 commit comments