From 42fd2a9d89e87e8840324873df23ab76ed2f4d3d Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Wed, 21 Sep 2011 15:39:46 -0700 Subject: [PATCH] Remove unused arg from revoke_clean --- src/comp/middle/trans.rs | 8 ++++---- src/comp/middle/trans_common.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 21e34102ab9..2ffc43b8745 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -2060,7 +2060,7 @@ fn move_val(cx: @block_ctxt, action: copy_action, dst: ValueRef, if src.is_mem { ret zero_alloca(cx, src.val, t).bcx; } // If we're here, it must be a temporary. - ret revoke_clean(cx, src_val, t); + ret revoke_clean(cx, src_val); } else if ty::type_is_unique(tcx, t) || type_is_structural_or_param(tcx, t) { if action == DROP_EXISTING { cx = drop_ty(cx, dst, t); } @@ -2068,7 +2068,7 @@ fn move_val(cx: @block_ctxt, action: copy_action, dst: ValueRef, if src.is_mem { ret zero_alloca(cx, src_val, t).bcx; } // If we're here, it must be a temporary. - ret revoke_clean(cx, src_val, t); + ret revoke_clean(cx, src_val); } /* FIXME: suggests a type constraint */ bcx_ccx(cx).sess.bug("unexpected type in trans::move_val: " + @@ -3823,8 +3823,8 @@ fn zero_and_revoke(bcx: @block_ctxt, for {v, t} in to_zero { bcx = zero_alloca(bcx, v, t).bcx; } - for {v, t} in to_revoke { - bcx = revoke_clean(bcx, v, t); + for {v, _} in to_revoke { + bcx = revoke_clean(bcx, v); } ret bcx; } diff --git a/src/comp/middle/trans_common.rs b/src/comp/middle/trans_common.rs index 74f60004f72..563ee322e6c 100644 --- a/src/comp/middle/trans_common.rs +++ b/src/comp/middle/trans_common.rs @@ -293,7 +293,7 @@ fn add_clean_temp(cx: @block_ctxt, val: ValueRef, ty: ty::t) { // to a system where we can also cancel the cleanup on local variables, but // this will be more involved. For now, we simply zero out the local, and the // drop glue checks whether it is zero. -fn revoke_clean(cx: @block_ctxt, val: ValueRef, t: ty::t) -> @block_ctxt { +fn revoke_clean(cx: @block_ctxt, val: ValueRef) -> @block_ctxt { let sc_cx = find_scope_cx(cx); let found = -1; let i = 0;