Skip to content

Commit 2d3c507

Browse files
committed
---
yaml --- r: 138464 b: refs/heads/try2 c: 77dc3ad h: refs/heads/master v: v3
1 parent 921cc05 commit 2d3c507

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 17dcaee9d13a39fe38e010514d8489060a20509d
8+
refs/heads/try2: 77dc3ad810d4887d1148d2b0d8e7807ecadaea3e
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libsyntax/ext/tt/macro_parser.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ pub fn is_some(&&mpu: matcher_pos_up) -> bool {
114114
pub struct MatcherPos {
115115
elts: ~[ast::matcher], // maybe should be /&? Need to understand regions.
116116
sep: Option<Token>,
117-
mut idx: uint,
118-
mut up: matcher_pos_up, // mutable for swapping only
117+
idx: uint,
118+
up: matcher_pos_up, // mutable for swapping only
119119
matches: ~[DVec<@named_match>],
120120
match_lo: uint, match_hi: uint,
121121
sp_lo: BytePos,
@@ -155,8 +155,8 @@ pub fn initial_matcher_pos(ms: ~[matcher], sep: Option<Token>, lo: BytePos)
155155
~MatcherPos {
156156
elts: ms,
157157
sep: sep,
158-
mut idx: 0u,
159-
mut up: matcher_pos_up(None),
158+
idx: 0u,
159+
up: matcher_pos_up(None),
160160
matches: copy vec::from_fn(count_names(ms), |_i| dvec::DVec()),
161161
match_lo: 0u,
162162
match_hi: match_idx_hi,
@@ -267,7 +267,7 @@ pub fn parse(sess: @mut ParseSess,
267267
if idx == len {
268268
// pop from the matcher position
269269
270-
let new_pos = copy_up(ei.up);
270+
let mut new_pos = copy_up(ei.up);
271271
272272
// update matches (the MBE "parse tree") by appending
273273
// each tree as a subtree.
@@ -295,13 +295,13 @@ pub fn parse(sess: @mut ParseSess,
295295
match copy ei.sep {
296296
Some(ref t) if idx == len => { // we need a separator
297297
if tok == (*t) { //pass the separator
298-
let ei_t = ei;
298+
let mut ei_t = ei;
299299
ei_t.idx += 1;
300300
next_eis.push(ei_t);
301301
}
302302
}
303303
_ => { // we don't need a separator
304-
let ei_t = ei;
304+
let mut ei_t = ei;
305305
ei_t.idx = 0;
306306
cur_eis.push(ei_t);
307307
}
@@ -315,7 +315,7 @@ pub fn parse(sess: @mut ParseSess,
315315
match_seq(ref matchers, ref sep, zero_ok,
316316
match_idx_lo, match_idx_hi) => {
317317
if zero_ok {
318-
let new_ei = copy ei;
318+
let mut new_ei = copy ei;
319319
new_ei.idx += 1u;
320320
//we specifically matched zero repeats.
321321
for uint::range(match_idx_lo, match_idx_hi) |idx| {
@@ -331,16 +331,16 @@ pub fn parse(sess: @mut ParseSess,
331331
cur_eis.push(~MatcherPos {
332332
elts: (*matchers),
333333
sep: (*sep),
334-
mut idx: 0u,
335-
mut up: matcher_pos_up(Some(ei_t)),
334+
idx: 0u,
335+
up: matcher_pos_up(Some(ei_t)),
336336
matches: matches,
337337
match_lo: match_idx_lo, match_hi: match_idx_hi,
338338
sp_lo: sp.lo
339339
});
340340
}
341341
match_nonterminal(_,_,_) => { bb_eis.push(ei) }
342342
match_tok(ref t) => {
343-
let ei_t = ei;
343+
let mut ei_t = ei;
344344
if (*t) == tok {
345345
ei_t.idx += 1;
346346
next_eis.push(ei_t);
@@ -388,7 +388,7 @@ pub fn parse(sess: @mut ParseSess,
388388
} else /* bb_eis.len() == 1 */ {
389389
let rust_parser = Parser(sess, cfg, rdr.dup());
390390
391-
let ei = bb_eis.pop();
391+
let mut ei = bb_eis.pop();
392392
match ei.elts[ei.idx].node {
393393
match_nonterminal(_, name, idx) => {
394394
ei.matches[idx].push(@matched_nonterminal(

0 commit comments

Comments
 (0)