Skip to content

Commit e235f6c

Browse files
committed
remove some unused mut decls and vars
1 parent 4dc62df commit e235f6c

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

src/librustc/back/link.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ pub fn link_binary(sess: Session,
788788
};
789789
790790
debug!("output: %s", output.to_str());
791-
let mut cc_args = link_args(sess, obj_filename, out_filename, lm);
791+
let cc_args = link_args(sess, obj_filename, out_filename, lm);
792792
debug!("%s link args: %s", cc_prog, str::connect(cc_args, ~" "));
793793
// We run 'cc' here
794794
let prog = run::program_output(cc_prog, cc_args);

src/librustc/middle/trans/closure.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ pub fn store_environment(bcx: block,
208208

209209
// allocate closure in the heap
210210
let Result {bcx: bcx, val: llbox} = allocate_cbox(bcx, sigil, cdata_ty);
211-
let mut temp_cleanups = ~[];
212211

213212
// cbox_ty has the form of a tuple: (a, b, c) we want a ptr to a
214213
// tuple. This could be a ptr in uniq or a box or on stack,
@@ -244,9 +243,6 @@ pub fn store_environment(bcx: block,
244243
}
245244

246245
}
247-
for vec::each(temp_cleanups) |cleanup| {
248-
revoke_clean(bcx, *cleanup);
249-
}
250246

251247
ClosureResult { llbox: llbox, cdata_ty: cdata_ty, bcx: bcx }
252248
}

src/librustc/middle/trans/reachable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub fn find_reachable(crate_mod: &_mod, exp_map2: resolve::ExportMap2,
4242
tcx: ty::ctxt, method_map: typeck::method_map) -> map {
4343
let mut rmap = HashSet::new();
4444
{
45-
let mut cx = @mut ctx {
45+
let cx = @mut ctx {
4646
exp_map2: exp_map2,
4747
tcx: tcx,
4848
method_map: method_map,

src/librustc/middle/ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1950,7 +1950,7 @@ pub fn type_contents(cx: ctxt, ty: t) -> TypeContents {
19501950
19511951
let _i = indenter();
19521952
1953-
let mut result = match get(ty).sty {
1953+
let result = match get(ty).sty {
19541954
// Scalar and unique types are sendable, constant, and owned
19551955
ty_nil | ty_bot | ty_bool | ty_int(_) | ty_uint(_) | ty_float(_) |
19561956
ty_bare_fn(_) | ty_ptr(_) => {

0 commit comments

Comments
 (0)