Skip to content

Commit

Permalink
Cleanup: remove useless parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
dim-an committed Aug 15, 2013
1 parent fc3297f commit 6d95765
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/librustc/middle/trans/_match.rs
Expand Up @@ -1294,18 +1294,14 @@ fn store_non_ref_bindings(bcx: @mut Block,

fn insert_lllocals(bcx: @mut Block,
bindings_map: &BindingsMap,
binding_mode: IrrefutablePatternBindingMode,
add_cleans: bool) -> @mut Block {
/*!
* For each binding in `data.bindings_map`, adds an appropriate entry into
* the `fcx.lllocals` map. If add_cleans is true, then adds cleanups for
* the bindings.
*/

let llmap = match binding_mode {
BindLocal => bcx.fcx.lllocals,
BindArgument => bcx.fcx.llargs
};
let llmap = bcx.fcx.lllocals;

for (&ident, &binding_info) in bindings_map.iter() {
let llval = match binding_info.trmode {
Expand Down Expand Up @@ -1358,7 +1354,7 @@ fn compile_guard(bcx: @mut Block,
bcx = store_non_ref_bindings(bcx,
data.bindings_map,
Some(&mut temp_cleanups));
bcx = insert_lllocals(bcx, data.bindings_map, BindLocal, false);
bcx = insert_lllocals(bcx, data.bindings_map, false);

let val = unpack_result!(bcx, {
do with_scope_result(bcx, guard_expr.info(),
Expand Down Expand Up @@ -1875,7 +1871,7 @@ fn trans_match_inner(scope_cx: @mut Block,
}

// insert bindings into the lllocals map and add cleanups
bcx = insert_lllocals(bcx, arm_data.bindings_map, BindLocal, true);
bcx = insert_lllocals(bcx, arm_data.bindings_map, true);

bcx = controlflow::trans_block(bcx, &arm_data.arm.body, dest);
bcx = trans_block_cleanups(bcx, block_cleanups(arm_data.bodycx));
Expand Down

0 comments on commit 6d95765

Please sign in to comment.