@@ -1206,7 +1206,8 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
1206
1206
is_non_exhaustive : variant. is_field_list_non_exhaustive ( ) ,
1207
1207
} ;
1208
1208
1209
- record ! ( self . tables. kind[ def_id] <- EntryKind :: Variant ( self . lazy( data) ) ) ;
1209
+ record ! ( self . tables. variant_data[ def_id] <- data) ;
1210
+ record ! ( self . tables. kind[ def_id] <- EntryKind :: Variant ) ;
1210
1211
self . tables . constness . set ( def_id. index , hir:: Constness :: Const ) ;
1211
1212
record_array ! ( self . tables. children[ def_id] <- variant. fields. iter( ) . map( |f| {
1212
1213
assert!( f. did. is_local( ) ) ;
@@ -1234,7 +1235,8 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
1234
1235
is_non_exhaustive : variant. is_field_list_non_exhaustive ( ) ,
1235
1236
} ;
1236
1237
1237
- record ! ( self . tables. kind[ def_id] <- EntryKind :: Variant ( self . lazy( data) ) ) ;
1238
+ record ! ( self . tables. variant_data[ def_id] <- data) ;
1239
+ record ! ( self . tables. kind[ def_id] <- EntryKind :: Variant ) ;
1238
1240
self . tables . constness . set ( def_id. index , hir:: Constness :: Const ) ;
1239
1241
if variant. ctor_kind == CtorKind :: Fn {
1240
1242
record ! ( self . tables. fn_sig[ def_id] <- tcx. fn_sig( def_id) ) ;
@@ -1301,8 +1303,9 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
1301
1303
} ;
1302
1304
1303
1305
record ! ( self . tables. repr_options[ def_id] <- adt_def. repr( ) ) ;
1306
+ record ! ( self . tables. variant_data[ def_id] <- data) ;
1307
+ record ! ( self . tables. kind[ def_id] <- EntryKind :: Struct ) ;
1304
1308
self . tables . constness . set ( def_id. index , hir:: Constness :: Const ) ;
1305
- record ! ( self . tables. kind[ def_id] <- EntryKind :: Struct ( self . lazy( data) ) ) ;
1306
1309
if variant. ctor_kind == CtorKind :: Fn {
1307
1310
record ! ( self . tables. fn_sig[ def_id] <- tcx. fn_sig( def_id) ) ;
1308
1311
}
@@ -1541,24 +1544,26 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
1541
1544
. map ( |ctor_hir_id| self . tcx . hir ( ) . local_def_id ( ctor_hir_id) . local_def_index ) ;
1542
1545
1543
1546
let variant = adt_def. non_enum_variant ( ) ;
1544
- EntryKind :: Struct ( self . lazy ( VariantData {
1547
+ record ! ( self . tables . variant_data [ def_id ] <- VariantData {
1545
1548
ctor_kind: variant. ctor_kind,
1546
1549
discr: variant. discr,
1547
1550
ctor,
1548
1551
is_non_exhaustive: variant. is_field_list_non_exhaustive( ) ,
1549
- } ) )
1552
+ } ) ;
1553
+ EntryKind :: Struct
1550
1554
}
1551
1555
hir:: ItemKind :: Union ( ..) => {
1552
1556
let adt_def = self . tcx . adt_def ( def_id) ;
1553
1557
record ! ( self . tables. repr_options[ def_id] <- adt_def. repr( ) ) ;
1554
1558
1555
1559
let variant = adt_def. non_enum_variant ( ) ;
1556
- EntryKind :: Union ( self . lazy ( VariantData {
1560
+ record ! ( self . tables . variant_data [ def_id ] <- VariantData {
1557
1561
ctor_kind: variant. ctor_kind,
1558
1562
discr: variant. discr,
1559
1563
ctor: None ,
1560
1564
is_non_exhaustive: variant. is_field_list_non_exhaustive( ) ,
1561
- } ) )
1565
+ } ) ;
1566
+ EntryKind :: Union
1562
1567
}
1563
1568
hir:: ItemKind :: Impl ( hir:: Impl { defaultness, constness, .. } ) => {
1564
1569
self . tables . impl_defaultness . set ( def_id. index , * defaultness) ;
0 commit comments