Skip to content

Commit 29515c0

Browse files
committed
---
yaml --- r: 32530 b: refs/heads/dist-snap c: f8b3eaa h: refs/heads/master v: v3
1 parent 5a2fbc3 commit 29515c0

File tree

14 files changed

+43
-40
lines changed

14 files changed

+43
-40
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
10-
refs/heads/dist-snap: 6957af770bb92b71485f852beb9071733e5f178b
10+
refs/heads/dist-snap: f8b3eaae820f87a5d51fe382aef5e9f8256beb29
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/dist-snap/src/libcore/extfmt.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ mod ct {
181181
let rest = copy next.flags;
182182
let j = next.next;
183183
let curr: ~[flag] = ~[f];
184-
return {flags: vec::append(curr, rest), next: j};
184+
return {flags: vec::append(move curr, rest), next: j};
185185
}
186186
let more = |x, copy s| more_(x, copy s, i, lim);
187187
let f = s[i];
@@ -195,7 +195,7 @@ mod ct {
195195
more(flag_sign_always)
196196
} else if f == '#' as u8 {
197197
more(flag_alternate)
198-
} else { {flags: noflags, next: i} };
198+
} else { {flags: move noflags, next: i} };
199199
}
200200
fn parse_count(s: ~str, i: uint, lim: uint)
201201
-> {count: count, next: uint} {

branches/dist-snap/src/libcore/mutable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fn unwrap<T>(+m: Mut<T>) -> T {
3434
// Borrowck should prevent us from calling unwrap while the value
3535
// is in use, as that would be a move from a borrowed value.
3636
assert (m.mode as uint) == (ReadOnly as uint);
37-
let Data {value, mode: _} = m;
37+
let Data {value, mode: _} <- m;
3838
return move value;
3939
}
4040

branches/dist-snap/src/libsyntax/ast_util.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ use codemap::span;
22
use ast::*;
33

44
pure fn spanned<T>(lo: uint, hi: uint, +t: T) -> spanned<T> {
5-
respan(mk_sp(lo, hi), t)
5+
respan(mk_sp(lo, hi), move t)
66
}
77

88
pure fn respan<T>(sp: span, +t: T) -> spanned<T> {
9-
{node: t, span: sp}
9+
{node: move t, span: sp}
1010
}
1111

1212
pure fn dummy_spanned<T>(+t: T) -> spanned<T> {
13-
respan(dummy_sp(), t)
13+
respan(dummy_sp(), move t)
1414
}
1515

1616
/* assuming that we're not in macro expansion */

branches/dist-snap/src/libsyntax/attr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ fn sort_meta_items(+items: ~[@ast::meta_item]) -> ~[@ast::meta_item] {
282282
// This is sort of stupid here, converting to a vec of mutables and back
283283
let v: ~[mut @ast::meta_item] = vec::to_mut(items);
284284
std::sort::quick_sort(lteq, v);
285-
return vec::from_mut(v);
285+
vec::from_mut(move v)
286286
}
287287

288288
fn remove_meta_items_by_name(items: ~[@ast::meta_item], name: ~str) ->

branches/dist-snap/src/libsyntax/ext/base.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,14 +222,14 @@ fn mk_ctxt(parse_sess: parse::parse_sess,
222222
self.parse_sess.interner.intern(@st)
223223
}
224224
}
225-
let imp : ctxt_repr = {
225+
let imp: ctxt_repr = {
226226
parse_sess: parse_sess,
227227
cfg: cfg,
228228
mut backtrace: None,
229229
mut mod_path: ~[],
230230
mut trace_mac: false
231231
};
232-
return imp as ext_ctxt
232+
move (imp as ext_ctxt)
233233
}
234234

235235
fn expr_to_str(cx: ext_ctxt, expr: @ast::expr, error: ~str) -> ~str {

branches/dist-snap/src/libsyntax/ext/pipes/liveness.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ fn analyze(proto: protocol, _cx: ext_ctxt) {
3939
for state.reachable |s| {
4040
bv.set(s.id, true);
4141
}
42-
bv
42+
move bv
4343
};
4444

4545
let mut i = 0;

branches/dist-snap/src/libsyntax/ext/pipes/proto.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ impl protocol {
188188
span: self.span,
189189
dir: dir,
190190
ty_params: ty_params,
191-
messages: messages,
191+
messages: move messages,
192192
proto: self
193193
});
194194

branches/dist-snap/src/libsyntax/ext/simplext.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ fn pattern_to_selectors(cx: ext_ctxt, e: @expr) -> binders {
143143
return Some(leaf(m));
144144
}
145145
p_t_s_rec(cx, match_expr(e), trivial_selector, res);
146-
return res;
146+
move res
147147
}
148148

149149

branches/dist-snap/src/libsyntax/ext/tt/macro_parser.rs

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ fn parse(sess: parse_sess, cfg: ast::crate_cfg, rdr: reader, ms: ~[matcher])
255255
sp.hi)));
256256
}
257257

258-
new_pos.idx += 1u;
259-
vec::push(cur_eis, new_pos);
258+
new_pos.idx += 1;
259+
vec::push(cur_eis, move new_pos);
260260
}
261261

262262
// can we go around again?
@@ -266,18 +266,18 @@ fn parse(sess: parse_sess, cfg: ast::crate_cfg, rdr: reader, ms: ~[matcher])
266266
Some(t) if idx == len => { // we need a separator
267267
if tok == t { //pass the separator
268268
let ei_t <- ei;
269-
ei_t.idx += 1u;
270-
vec::push(next_eis, ei_t);
269+
ei_t.idx += 1;
270+
vec::push(next_eis, move ei_t);
271271
}
272272
}
273273
_ => { // we don't need a separator
274274
let ei_t <- ei;
275-
ei_t.idx = 0u;
276-
vec::push(cur_eis, ei_t);
275+
ei_t.idx = 0;
276+
vec::push(cur_eis, move ei_t);
277277
}
278278
}
279279
} else {
280-
vec::push(eof_eis, ei);
280+
vec::push(eof_eis, move ei);
281281
}
282282
} else {
283283
match copy ei.elts[idx].node {
@@ -292,24 +292,27 @@ fn parse(sess: parse_sess, cfg: ast::crate_cfg, rdr: reader, ms: ~[matcher])
292292
new_ei.matches[idx].push(@matched_seq(~[], sp));
293293
}
294294

295-
vec::push(cur_eis, new_ei);
295+
vec::push(cur_eis, move new_ei);
296296
}
297297

298298
let matches = vec::map(ei.matches, // fresh, same size:
299299
|_m| DVec::<@named_match>());
300300
let ei_t <- ei;
301301
vec::push(cur_eis, ~{
302302
elts: matchers, sep: sep, mut idx: 0u,
303-
mut up: matcher_pos_up(Some(ei_t)),
304-
matches: matches,
303+
mut up: matcher_pos_up(Some(move ei_t)),
304+
matches: move matches,
305305
match_lo: match_idx_lo, match_hi: match_idx_hi,
306306
sp_lo: sp.lo
307307
});
308308
}
309-
match_nonterminal(_,_,_) => { vec::push(bb_eis, ei) }
309+
match_nonterminal(_,_,_) => { vec::push(bb_eis, move ei) }
310310
match_tok(t) => {
311311
let ei_t <- ei;
312-
if t == tok { ei_t.idx += 1u; vec::push(next_eis, ei_t)}
312+
if t == tok {
313+
ei_t.idx += 1;
314+
vec::push(next_eis, move ei_t);
315+
}
313316
}
314317
}
315318
}
@@ -362,7 +365,7 @@ fn parse(sess: parse_sess, cfg: ast::crate_cfg, rdr: reader, ms: ~[matcher])
362365
}
363366
_ => fail
364367
}
365-
vec::push(cur_eis,ei);
368+
vec::push(cur_eis, move ei);
366369
367370
/* this would fail if zero-length tokens existed */
368371
while rdr.peek().sp.lo < rust_parser.span.lo {

branches/dist-snap/src/libsyntax/parse.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ fn parse_from_source_str<T>(f: fn (p: parser) -> T,
157157
p.abort_if_errors();
158158
sess.chpos = rdr.chpos;
159159
sess.byte_pos = sess.byte_pos + rdr.pos;
160-
return r;
160+
move r
161161
}
162162

163163
fn next_node_id(sess: parse_sess) -> node_id {
@@ -184,7 +184,7 @@ fn new_parser_from_source_str(sess: parse_sess, cfg: ast::crate_cfg,
184184
+name: ~str, +ss: codemap::file_substr,
185185
source: @~str) -> parser {
186186
let (p, _) = new_parser_etc_from_source_str(sess, cfg, name, ss, source);
187-
return p;
187+
move p
188188
}
189189

190190

@@ -208,7 +208,7 @@ fn new_parser_etc_from_file(sess: parse_sess, cfg: ast::crate_cfg,
208208
fn new_parser_from_file(sess: parse_sess, cfg: ast::crate_cfg, path: &Path,
209209
ftype: parser::file_type) -> parser {
210210
let (p, _) = new_parser_etc_from_file(sess, cfg, path, ftype);
211-
return p;
211+
move p
212212
}
213213

214214
fn new_parser_from_tt(sess: parse_sess, cfg: ast::crate_cfg,

branches/dist-snap/src/libsyntax/parse/parser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3578,8 +3578,8 @@ impl parser {
35783578
}
35793579

35803580
{attrs_remaining: attrs,
3581-
view_items: vec::from_mut(dvec::unwrap(view_items)),
3582-
items: vec::from_mut(dvec::unwrap(items))}
3581+
view_items: vec::from_mut(dvec::unwrap(move view_items)),
3582+
items: vec::from_mut(dvec::unwrap(move items))}
35833583
}
35843584

35853585
// Parses a source module as a crate

branches/dist-snap/src/libsyntax/print/pp.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ const size_infinity: int = 0xffff;
124124
fn mk_printer(out: io::Writer, linewidth: uint) -> printer {
125125
// Yes 3, it makes the ring buffers big enough to never
126126
// fall behind.
127-
let n: uint = 3u * linewidth;
127+
let n: uint = 3 * linewidth;
128128
debug!("mk_printer %u", linewidth);
129129
let token: ~[mut token] = vec::to_mut(vec::from_elem(n, EOF));
130130
let size: ~[mut int] = vec::to_mut(vec::from_elem(n, 0));
@@ -133,16 +133,16 @@ fn mk_printer(out: io::Writer, linewidth: uint) -> printer {
133133
buf_len: n,
134134
mut margin: linewidth as int,
135135
mut space: linewidth as int,
136-
mut left: 0u,
137-
mut right: 0u,
138-
token: token,
139-
size: size,
136+
mut left: 0,
137+
mut right: 0,
138+
token: move token,
139+
size: move size,
140140
mut left_total: 0,
141141
mut right_total: 0,
142-
mut scan_stack: scan_stack,
142+
mut scan_stack: move scan_stack,
143143
mut scan_stack_empty: true,
144-
mut top: 0u,
145-
mut bottom: 0u,
144+
mut top: 0,
145+
mut bottom: 0,
146146
print_stack: DVec(),
147147
mut pending_indentation: 0,
148148
mut token_tree_last_was_ident: false})

branches/dist-snap/src/libsyntax/util/interner.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ fn mk<T:Eq IterBytes Hash Const Copy>() -> interner<T> {
1616
let m = map::HashMap::<T, uint>();
1717
let hi: hash_interner<T> =
1818
{map: m, vect: DVec()};
19-
return hi as interner::<T>;
19+
move (hi as interner::<T>)
2020
}
2121

2222
fn mk_prefill<T:Eq IterBytes Hash Const Copy>(init: ~[T]) -> interner<T> {

0 commit comments

Comments
 (0)