@@ -228,14 +228,14 @@ impl<'tcx> Cx<'tcx> {
228228 expr : self . mirror_expr ( e) ,
229229 } )
230230 . collect ( ) ;
231- ExprKind :: Adt {
231+ ExprKind :: Adt ( Box :: new ( Adt {
232232 adt_def,
233233 substs,
234234 variant_index : index,
235235 fields : field_refs,
236236 user_ty,
237237 base : None ,
238- }
238+ } ) )
239239 } else {
240240 ExprKind :: Call {
241241 ty : self . typeck_results ( ) . node_type ( fun. hir_id ) ,
@@ -362,7 +362,7 @@ impl<'tcx> Cx<'tcx> {
362362 let user_provided_types = self . typeck_results ( ) . user_provided_types ( ) ;
363363 let user_ty = user_provided_types. get ( expr. hir_id ) . copied ( ) ;
364364 debug ! ( "make_mirror_unadjusted: (struct/union) user_ty={:?}" , user_ty) ;
365- ExprKind :: Adt {
365+ ExprKind :: Adt ( Box :: new ( Adt {
366366 adt_def : adt,
367367 variant_index : VariantIdx :: new ( 0 ) ,
368368 substs,
@@ -375,7 +375,7 @@ impl<'tcx> Cx<'tcx> {
375375 . copied ( )
376376 . collect ( ) ,
377377 } ) ,
378- }
378+ } ) )
379379 }
380380 AdtKind :: Enum => {
381381 let res = self . typeck_results ( ) . qpath_res ( qpath, expr. hir_id ) ;
@@ -388,14 +388,14 @@ impl<'tcx> Cx<'tcx> {
388388 self . typeck_results ( ) . user_provided_types ( ) ;
389389 let user_ty = user_provided_types. get ( expr. hir_id ) . copied ( ) ;
390390 debug ! ( "make_mirror_unadjusted: (variant) user_ty={:?}" , user_ty) ;
391- ExprKind :: Adt {
391+ ExprKind :: Adt ( Box :: new ( Adt {
392392 adt_def : adt,
393393 variant_index : index,
394394 substs,
395395 user_ty,
396396 fields : self . field_refs ( fields) ,
397397 base : None ,
398- }
398+ } ) )
399399 }
400400 _ => {
401401 span_bug ! ( expr. span, "unexpected res: {:?}" , res) ;
@@ -906,14 +906,14 @@ impl<'tcx> Cx<'tcx> {
906906 match ty. kind ( ) {
907907 // A unit struct/variant which is used as a value.
908908 // 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 {
910910 adt_def,
911911 variant_index : adt_def. variant_index_with_ctor_id ( def_id) ,
912912 substs,
913913 user_ty : user_provided_type,
914914 fields : box [ ] ,
915915 base : None ,
916- } ,
916+ } ) ) ,
917917 _ => bug ! ( "unexpected ty: {:?}" , ty) ,
918918 }
919919 }
0 commit comments