@@ -228,14 +228,14 @@ impl<'tcx> Cx<'tcx> {
228
228
expr : self . mirror_expr ( e) ,
229
229
} )
230
230
. collect ( ) ;
231
- ExprKind :: Adt {
231
+ ExprKind :: Adt ( Box :: new ( Adt {
232
232
adt_def,
233
233
substs,
234
234
variant_index : index,
235
235
fields : field_refs,
236
236
user_ty,
237
237
base : None ,
238
- }
238
+ } ) )
239
239
} else {
240
240
ExprKind :: Call {
241
241
ty : self . typeck_results ( ) . node_type ( fun. hir_id ) ,
@@ -362,7 +362,7 @@ impl<'tcx> Cx<'tcx> {
362
362
let user_provided_types = self . typeck_results ( ) . user_provided_types ( ) ;
363
363
let user_ty = user_provided_types. get ( expr. hir_id ) . copied ( ) ;
364
364
debug ! ( "make_mirror_unadjusted: (struct/union) user_ty={:?}" , user_ty) ;
365
- ExprKind :: Adt {
365
+ ExprKind :: Adt ( Box :: new ( Adt {
366
366
adt_def : adt,
367
367
variant_index : VariantIdx :: new ( 0 ) ,
368
368
substs,
@@ -375,7 +375,7 @@ impl<'tcx> Cx<'tcx> {
375
375
. copied ( )
376
376
. collect ( ) ,
377
377
} ) ,
378
- }
378
+ } ) )
379
379
}
380
380
AdtKind :: Enum => {
381
381
let res = self . typeck_results ( ) . qpath_res ( qpath, expr. hir_id ) ;
@@ -388,14 +388,14 @@ impl<'tcx> Cx<'tcx> {
388
388
self . typeck_results ( ) . user_provided_types ( ) ;
389
389
let user_ty = user_provided_types. get ( expr. hir_id ) . copied ( ) ;
390
390
debug ! ( "make_mirror_unadjusted: (variant) user_ty={:?}" , user_ty) ;
391
- ExprKind :: Adt {
391
+ ExprKind :: Adt ( Box :: new ( Adt {
392
392
adt_def : adt,
393
393
variant_index : index,
394
394
substs,
395
395
user_ty,
396
396
fields : self . field_refs ( fields) ,
397
397
base : None ,
398
- }
398
+ } ) )
399
399
}
400
400
_ => {
401
401
span_bug ! ( expr. span, "unexpected res: {:?}" , res) ;
@@ -906,14 +906,14 @@ impl<'tcx> Cx<'tcx> {
906
906
match ty. kind ( ) {
907
907
// A unit struct/variant which is used as a value.
908
908
// We return a completely different ExprKind here to account for this special case.
909
- ty:: Adt ( adt_def, substs) => ExprKind :: Adt {
909
+ ty:: Adt ( adt_def, substs) => ExprKind :: Adt ( Box :: new ( Adt {
910
910
adt_def,
911
911
variant_index : adt_def. variant_index_with_ctor_id ( def_id) ,
912
912
substs,
913
913
user_ty : user_provided_type,
914
914
fields : box [ ] ,
915
915
base : None ,
916
- } ,
916
+ } ) ) ,
917
917
_ => bug ! ( "unexpected ty: {:?}" , ty) ,
918
918
}
919
919
}
0 commit comments