diff options
| author | Brian Anderson <banderson@mozilla.com> | 2014-10-31 16:20:41 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2014-11-21 13:18:08 -0800 |
| commit | aad246160451aacc2f7a707c028bdf44e77ad38d (patch) | |
| tree | 0caee1d89bc0703990a241775aae0bff49d84b01 /src/libsyntax/parse/lexer | |
| parent | ca1820b1fce5aa803ccc757e79dd659f599d1516 (diff) | |
| download | rust-aad246160451aacc2f7a707c028bdf44e77ad38d.tar.gz rust-aad246160451aacc2f7a707c028bdf44e77ad38d.zip | |
core: Convert Char::escape_default, escape_unicode to iterators
[breaking-change]
Diffstat (limited to 'src/libsyntax/parse/lexer')
| -rw-r--r-- | src/libsyntax/parse/lexer/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs index e19e38e2977..4c759cfc4fd 100644 --- a/src/libsyntax/parse/lexer/mod.rs +++ b/src/libsyntax/parse/lexer/mod.rs @@ -193,7 +193,7 @@ impl<'a> StringReader<'a> { fn fatal_span_char(&self, from_pos: BytePos, to_pos: BytePos, m: &str, c: char) -> ! { let mut m = m.to_string(); m.push_str(": "); - char::escape_default(c, |c| m.push(c)); + for c in c.escape_default() { m.push(c) } self.fatal_span_(from_pos, to_pos, m.as_slice()); } @@ -202,7 +202,7 @@ impl<'a> StringReader<'a> { fn err_span_char(&self, from_pos: BytePos, to_pos: BytePos, m: &str, c: char) { let mut m = m.to_string(); m.push_str(": "); - char::escape_default(c, |c| m.push(c)); + for c in c.escape_default() { m.push(c) } self.err_span_(from_pos, to_pos, m.as_slice()); } |
