Remove uses of binary move in the compiler

This commit is contained in:
Tim Chevalier 2012-10-23 11:16:51 -07:00
parent 46fef3d601
commit 48c8d1fecd
3 changed files with 6 additions and 6 deletions

View File

@ -265,13 +265,13 @@ fn parse(sess: parse_sess, cfg: ast::crate_cfg, rdr: reader, ms: ~[matcher])
match copy ei.sep {
Some(t) if idx == len => { // we need a separator
if tok == t { //pass the separator
let ei_t <- ei;
let ei_t = move ei;
ei_t.idx += 1;
next_eis.push(move ei_t);
}
}
_ => { // we don't need a separator
let ei_t <- ei;
let ei_t = move ei;
ei_t.idx = 0;
cur_eis.push(move ei_t);
}
@ -297,7 +297,7 @@ fn parse(sess: parse_sess, cfg: ast::crate_cfg, rdr: reader, ms: ~[matcher])
let matches = vec::map(ei.matches, // fresh, same size:
|_m| DVec::<@named_match>());
let ei_t <- ei;
let ei_t = move ei;
cur_eis.push(~{
elts: matchers, sep: sep, mut idx: 0u,
mut up: matcher_pos_up(Some(move ei_t)),
@ -308,7 +308,7 @@ fn parse(sess: parse_sess, cfg: ast::crate_cfg, rdr: reader, ms: ~[matcher])
}
match_nonterminal(_,_,_) => { bb_eis.push(move ei) }
match_tok(t) => {
let ei_t <- ei;
let ei_t = move ei;
if t == tok {
ei_t.idx += 1;
next_eis.push(move ei_t);

View File

@ -397,7 +397,7 @@ type req_maps = {
fn save_and_restore<T:Copy,U>(save_and_restore_t: &mut T, f: fn() -> U) -> U {
let old_save_and_restore_t = *save_and_restore_t;
let u <- f();
let u = f();
*save_and_restore_t = old_save_and_restore_t;
move u
}

View File

@ -562,7 +562,7 @@ impl infer_ctxt {
debug!("commit()");
do indent {
let r <- self.try(f);
let r = self.try(f);
self.ty_var_bindings.bindings.truncate(0);
self.int_var_bindings.bindings.truncate(0);