@@ -296,6 +296,7 @@ fn trans_custom_dtor<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
296
296
sized_args = [ v0] ;
297
297
& sized_args
298
298
} else {
299
+ // FIXME(#36457) -- we should pass unsized values to drop glue as two arguments
299
300
unsized_args = [
300
301
Load ( bcx, get_dataptr ( bcx, v0) ) ,
301
302
Load ( bcx, get_meta ( bcx, v0) )
@@ -440,7 +441,9 @@ pub fn size_and_align_of_dst<'blk, 'tcx>(bcx: &BlockAndBuilder<'blk, 'tcx>,
440
441
}
441
442
}
442
443
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 > )
444
447
-> Block < ' blk , ' tcx > {
445
448
let t = g. ty ( ) ;
446
449
@@ -463,6 +466,7 @@ fn make_drop_glue<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, v0: ValueRef, g: DropGlueK
463
466
let llval = get_dataptr ( bcx, v0) ;
464
467
let llbox = Load ( bcx, llval) ;
465
468
let bcx = drop_ty ( bcx, v0, content_ty, DebugLoc :: None ) ;
469
+ // FIXME(#36457) -- we should pass unsized values to drop glue as two arguments
466
470
let info = get_meta ( bcx, v0) ;
467
471
let info = Load ( bcx, info) ;
468
472
let ( llsize, llalign) =
@@ -488,6 +492,7 @@ fn make_drop_glue<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, v0: ValueRef, g: DropGlueK
488
492
// No support in vtable for distinguishing destroying with
489
493
// versus without calling Drop::drop. Assert caller is
490
494
// okay with always calling the Drop impl, if any.
495
+ // FIXME(#36457) -- we should pass unsized values to drop glue as two arguments
491
496
assert ! ( !skip_dtor) ;
492
497
let data_ptr = get_dataptr ( bcx, v0) ;
493
498
let vtable_ptr = Load ( bcx, get_meta ( bcx, v0) ) ;
@@ -543,6 +548,7 @@ fn drop_structural_ty<'blk, 'tcx>(cx: Block<'blk, 'tcx>,
543
548
let value = if type_is_sized ( cx. tcx ( ) , t) {
544
549
adt:: MaybeSizedValue :: sized ( av)
545
550
} else {
551
+ // FIXME(#36457) -- we should pass unsized values as two arguments
546
552
let data = Load ( cx, get_dataptr ( cx, av) ) ;
547
553
let info = Load ( cx, get_meta ( cx, av) ) ;
548
554
adt:: MaybeSizedValue :: unsized_ ( data, info)
@@ -586,6 +592,7 @@ fn drop_structural_ty<'blk, 'tcx>(cx: Block<'blk, 'tcx>,
586
592
let val = if type_is_sized ( cx. tcx ( ) , field_ty) {
587
593
llfld_a
588
594
} else {
595
+ // FIXME(#36457) -- we should pass unsized values as two arguments
589
596
let scratch = alloc_ty ( cx, field_ty, "__fat_ptr_iter" ) ;
590
597
Store ( cx, llfld_a, get_dataptr ( cx, scratch) ) ;
591
598
Store ( cx, value. meta , get_meta ( cx, scratch) ) ;
0 commit comments