Skip to content

Commit 1f4ace9

Browse files
committed
---
yaml --- r: 15775 b: refs/heads/try c: 5af58e7 h: refs/heads/master i: 15773: 0a346b4 15771: 15dc37c 15767: 470a3d2 15759: 49da4b8 15743: b40eacf v: v3
1 parent 4ec2cd9 commit 1f4ace9

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: fa6c18e0149c9e31a69c9084c416ea5c7cd363dd
5+
refs/heads/try: 5af58e79269600c962f1de3bee57e804a36695a8
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/libcore/path.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ fn normalize(p: path) -> path {
251251
let mut t = [];
252252
let mut i = vec::len(s);
253253
let mut skip = 0;
254-
do {
254+
while i != 0u {
255255
i -= 1u;
256256
if s[i] == ".." {
257257
skip += 1;
@@ -262,7 +262,7 @@ fn normalize(p: path) -> path {
262262
skip -= 1;
263263
}
264264
}
265-
} while i != 0u;
265+
}
266266
let mut t = vec::reversed(t);
267267
while skip > 0 {
268268
t += [".."];

branches/try/src/rustc/metadata/tydecode.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,11 @@ fn parse_constrs(st: @pstate, conv: conv_did) -> [@ty::constr] {
6969
let mut rslt: [@ty::constr] = [];
7070
alt peek(st) {
7171
':' {
72-
do {
72+
loop {
7373
next(st);
7474
rslt += [parse_constr(st, conv, parse_constr_arg)];
75-
} while peek(st) == ';'
75+
if peek(st) != ';' { break; }
76+
}
7677
}
7778
_ { }
7879
}
@@ -84,10 +85,11 @@ fn parse_ty_constrs(st: @pstate, conv: conv_did) -> [@ty::type_constr] {
8485
let mut rslt: [@ty::type_constr] = [];
8586
alt peek(st) {
8687
':' {
87-
do {
88+
loop {
8889
next(st);
8990
rslt += [parse_constr(st, conv, parse_ty_constr_arg)];
90-
} while peek(st) == ';'
91+
if peek(st) != ';' { break; }
92+
}
9193
}
9294
_ { }
9395
}
@@ -154,12 +156,13 @@ fn parse_constr<T: copy>(st: @pstate, conv: conv_did,
154156
assert (ignore == '(');
155157
let def = parse_def(st, conv);
156158
let mut an_arg: constr_arg_general_<T>;
157-
do {
159+
loop {
158160
an_arg = pser(st);
159161
// FIXME use a real span
160162
args += [@respan(sp, an_arg)];
161163
ignore = next(st);
162-
} while ignore == ';'
164+
if ignore != ';' { break; }
165+
}
163166
assert (ignore == ')');
164167
ret @respan(sp, {path: pth, args: args, id: def});
165168
}

0 commit comments

Comments
 (0)