@@ -296,6 +296,7 @@ fn trans_custom_dtor<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
296296 sized_args = [ v0] ;
297297 & sized_args
298298 } else {
299+ // FIXME(#36457) -- we should pass unsized values to drop glue as two arguments
299300 unsized_args = [
300301 Load ( bcx, get_dataptr ( bcx, v0) ) ,
301302 Load ( bcx, get_meta ( bcx, v0) )
@@ -440,7 +441,9 @@ pub fn size_and_align_of_dst<'blk, 'tcx>(bcx: &BlockAndBuilder<'blk, 'tcx>,
440441 }
441442}
442443
443- fn make_drop_glue < ' blk , ' tcx > ( bcx : Block < ' blk , ' tcx > , v0 : ValueRef , g : DropGlueKind < ' tcx > )
444+ fn make_drop_glue < ' blk , ' tcx > ( bcx : Block < ' blk , ' tcx > ,
445+ v0 : ValueRef ,
446+ g : DropGlueKind < ' tcx > )
444447 -> Block < ' blk , ' tcx > {
445448 let t = g. ty ( ) ;
446449
@@ -463,6 +466,7 @@ fn make_drop_glue<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, v0: ValueRef, g: DropGlueK
463466 let llval = get_dataptr ( bcx, v0) ;
464467 let llbox = Load ( bcx, llval) ;
465468 let bcx = drop_ty ( bcx, v0, content_ty, DebugLoc :: None ) ;
469+ // FIXME(#36457) -- we should pass unsized values to drop glue as two arguments
466470 let info = get_meta ( bcx, v0) ;
467471 let info = Load ( bcx, info) ;
468472 let ( llsize, llalign) =
@@ -488,6 +492,7 @@ fn make_drop_glue<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, v0: ValueRef, g: DropGlueK
488492 // No support in vtable for distinguishing destroying with
489493 // versus without calling Drop::drop. Assert caller is
490494 // okay with always calling the Drop impl, if any.
495+ // FIXME(#36457) -- we should pass unsized values to drop glue as two arguments
491496 assert ! ( !skip_dtor) ;
492497 let data_ptr = get_dataptr ( bcx, v0) ;
493498 let vtable_ptr = Load ( bcx, get_meta ( bcx, v0) ) ;
@@ -543,6 +548,7 @@ fn drop_structural_ty<'blk, 'tcx>(cx: Block<'blk, 'tcx>,
543548 let value = if type_is_sized ( cx. tcx ( ) , t) {
544549 adt:: MaybeSizedValue :: sized ( av)
545550 } else {
551+ // FIXME(#36457) -- we should pass unsized values as two arguments
546552 let data = Load ( cx, get_dataptr ( cx, av) ) ;
547553 let info = Load ( cx, get_meta ( cx, av) ) ;
548554 adt:: MaybeSizedValue :: unsized_ ( data, info)
@@ -586,6 +592,7 @@ fn drop_structural_ty<'blk, 'tcx>(cx: Block<'blk, 'tcx>,
586592 let val = if type_is_sized ( cx. tcx ( ) , field_ty) {
587593 llfld_a
588594 } else {
595+ // FIXME(#36457) -- we should pass unsized values as two arguments
589596 let scratch = alloc_ty ( cx, field_ty, "__fat_ptr_iter" ) ;
590597 Store ( cx, llfld_a, get_dataptr ( cx, scratch) ) ;
591598 Store ( cx, value. meta , get_meta ( cx, scratch) ) ;
0 commit comments