Skip to content

Commit d7e8c12

Browse files
committed
---
yaml --- r: 79397 b: refs/heads/snap-stage3 c: fcc7aff h: refs/heads/master i: 79395: df0c15b v: v3
1 parent 9b7a621 commit d7e8c12

File tree

4 files changed

+1
-26
lines changed

4 files changed

+1
-26
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 124eb2119c78651cfaaa7a046a101fa2e20f83ca
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 2bd628eafab1225cdc59c468c32868302b5e92ed
4+
refs/heads/snap-stage3: fcc7aff62b23f85e8b12bfefb47bc073f49e8e8f
55
refs/heads/try: ac820906c0e53eab79a98ee64f7231f57c3887b4
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libstd/fmt/parse.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ pub struct SelectArm<'self> {
149149
pub struct Parser<'self> {
150150
priv input: &'self str,
151151
priv cur: str::CharOffsetIterator<'self>,
152-
priv depth: uint,
153152
}
154153

155154
impl<'self> iterator::Iterator<Piece<'self>> for Parser<'self> {
@@ -169,11 +168,6 @@ impl<'self> iterator::Iterator<Piece<'self>> for Parser<'self> {
169168
self.escape(); // ensure it's a valid escape sequence
170169
Some(String(self.string(pos + 1))) // skip the '\' character
171170
}
172-
Some((_, '}')) if self.depth == 0 => {
173-
self.cur.next();
174-
self.err(~"unmatched `}` found");
175-
None
176-
}
177171
Some((_, '}')) | None => { None }
178172
Some((pos, _)) => {
179173
Some(String(self.string(pos)))
@@ -188,7 +182,6 @@ impl<'self> Parser<'self> {
188182
Parser {
189183
input: s,
190184
cur: s.char_offset_iter(),
191-
depth: 0,
192185
}
193186
}
194187

@@ -400,9 +393,7 @@ impl<'self> Parser<'self> {
400393
if !self.wsconsume('{') {
401394
self.err(~"selector must be followed by `{`");
402395
}
403-
self.depth += 1;
404396
let pieces = self.collect();
405-
self.depth -= 1;
406397
if !self.wsconsume('}') {
407398
self.err(~"selector case must be terminated by `}`");
408399
}
@@ -503,9 +494,7 @@ impl<'self> Parser<'self> {
503494
if !self.wsconsume('{') {
504495
self.err(~"selector must be followed by `{`");
505496
}
506-
self.depth += 1;
507497
let pieces = self.collect();
508-
self.depth -= 1;
509498
if !self.wsconsume('}') {
510499
self.err(~"selector case must be terminated by `}`");
511500
}

branches/snap-stage3/src/libstd/str.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1370,8 +1370,6 @@ pub trait StrSlice<'self> {
13701370
13711371
fn slice_shift_char(&self) -> (char, &'self str);
13721372
1373-
fn map_chars(&self, ff: &fn(char) -> char) -> ~str;
1374-
13751373
fn lev_distance(&self, t: &str) -> uint;
13761374
13771375
fn subslice_offset(&self, inner: &str) -> uint;
@@ -2088,15 +2086,6 @@ impl<'self> StrSlice<'self> for &'self str {
20882086
return (ch, next_s);
20892087
}
20902088
2091-
/// Apply a function to each character.
2092-
fn map_chars(&self, ff: &fn(char) -> char) -> ~str {
2093-
let mut result = with_capacity(self.len());
2094-
for cc in self.iter() {
2095-
result.push_char(ff(cc));
2096-
}
2097-
result
2098-
}
2099-
21002089
/// Levenshtein Distance between two strings.
21012090
fn lev_distance(&self, t: &str) -> uint {
21022091
let slen = self.len();

branches/snap-stage3/src/test/compile-fail/ifmt-bad-arg.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,4 @@ fn main() {
7171
format!("{0, select, other{{}}}", "a"); //~ ERROR: cannot use implicit
7272
format!("{0, plural, other{{}}}", 1); //~ ERROR: cannot use implicit
7373
format!("{0, plural, other{{1:.*d}}}", 1, 2); //~ ERROR: cannot use implicit
74-
75-
format!("foo } bar"); //~ ERROR: unmatched `}` found
76-
format!("foo }"); //~ ERROR: unmatched `}` found
7774
}

0 commit comments

Comments
 (0)