Skip to content

Commit

Permalink
Auto merge of #28020 - dotdash:ref_fat_ptr_be_gone, r=eddyb
Browse files Browse the repository at this point in the history
r? @eddyb -- we talked about this on IRC a while back but I only now managed to get the change done.
  • Loading branch information
bors committed Aug 27, 2015
2 parents af83d98 + 05d3696 commit ab21fe5
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/librustc_trans/trans/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,14 +390,7 @@ fn apply_adjustments<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
// (You might think there is a more elegant way to do this than a
// skip_reborrows bool, but then you remember that the borrow checker exists).
if skip_reborrows == 0 && adj.autoref.is_some() {
if !type_is_sized(bcx.tcx(), datum.ty) {
// Arrange cleanup
let lval = unpack_datum!(bcx,
datum.to_lvalue_datum(bcx, "ref_fat_ptr", expr.id));
datum = unpack_datum!(bcx, ref_fat_ptr(bcx, lval));
} else {
datum = unpack_datum!(bcx, auto_ref(bcx, datum, expr));
}
datum = unpack_datum!(bcx, auto_ref(bcx, datum, expr));
}

if let Some(target) = adj.unsize {
Expand Down

0 comments on commit ab21fe5

Please sign in to comment.