about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBjörn Steinbrink <bsteinbr@gmail.com>2015-08-25 18:11:15 +0200
committerBjörn Steinbrink <bsteinbr@gmail.com>2015-08-25 18:36:10 +0200
commitf3bd14ab112ff77565dbb57a69540bbae2607ee9 (patch)
tree69170459a8a512ef4c215d68c1cd8a9cfab7a4a4
parent6e60fdba1794893dbd1855f01fb0f6b32b70137a (diff)
downloadrust-f3bd14ab112ff77565dbb57a69540bbae2607ee9.tar.gz
rust-f3bd14ab112ff77565dbb57a69540bbae2607ee9.zip
Turn some alloca_no_lifetime() calls into plain alloca() calls
The issues that the comments referred to were fixed before the PR even
landed but we never got around to remove the hack of skipping the
lifetime start.
-rw-r--r--src/librustc_trans/trans/expr.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/librustc_trans/trans/expr.rs b/src/librustc_trans/trans/expr.rs
index efccba91650..8d56f8829ee 100644
--- a/src/librustc_trans/trans/expr.rs
+++ b/src/librustc_trans/trans/expr.rs
@@ -247,8 +247,7 @@ pub fn trans<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
             immediate_rvalue(load_ty(bcx, global, const_ty), const_ty)
         } else {
             let llty = type_of::type_of(bcx.ccx(), const_ty);
-            // HACK(eddyb) get around issues with lifetime intrinsics.
-            let scratch = alloca_no_lifetime(bcx, llty, "const");
+            let scratch = alloca(bcx, llty, "const");
             let lldest = if !const_ty.is_structural() {
                 // Cast pointer to slot, because constants have different types.
                 PointerCast(bcx, scratch, val_ty(global))
@@ -412,8 +411,7 @@ fn apply_adjustments<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
                 let target = bcx.monomorphize(&target);
                 let llty = type_of::type_of(bcx.ccx(), target);
 
-                // HACK(eddyb) get around issues with lifetime intrinsics.
-                let scratch = alloca_no_lifetime(bcx, llty, "__coerce_target");
+                let scratch = alloca(bcx, llty, "__coerce_target");
                 let target_datum = Datum::new(scratch, target,
                                               Rvalue::new(ByRef));
                 bcx = coerce_unsized(bcx, expr.span, source_datum, target_datum);