about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-08-27 03:57:21 +0000
committerbors <bors@rust-lang.org>2015-08-27 03:57:21 +0000
commitab21fe59e9dc79dd9949ab663e3d94e41273131c (patch)
tree9443fa4408247da85d7fb9a5e85f7bcc5f1727ff
parentaf83d98d2444ff4af97a0f150fa5e5657de5b282 (diff)
parent05d36965dff534d5976d4b3d7c443813992bdec7 (diff)
downloadrust-ab21fe59e9dc79dd9949ab663e3d94e41273131c.tar.gz
rust-ab21fe59e9dc79dd9949ab663e3d94e41273131c.zip
Auto merge of #28020 - dotdash:ref_fat_ptr_be_gone, r=eddyb
r? @eddyb -- we talked about this on IRC a while back but I only now managed to get the change done.
-rw-r--r--src/librustc_trans/trans/expr.rs9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/librustc_trans/trans/expr.rs b/src/librustc_trans/trans/expr.rs
index 64c146e3825..0bec181b9b2 100644
--- a/src/librustc_trans/trans/expr.rs
+++ b/src/librustc_trans/trans/expr.rs
@@ -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 {