From aad246160451aacc2f7a707c028bdf44e77ad38d Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 31 Oct 2014 16:20:41 -0700 Subject: core: Convert Char::escape_default, escape_unicode to iterators [breaking-change] --- src/libsyntax/parse/lexer/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libsyntax/parse') 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()); } -- cgit 1.4.1-3-g733a5