about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorAleksey Kladov <aleksey.kladov@gmail.com>2015-09-10 15:14:24 +0300
committerAleksey Kladov <aleksey.kladov@gmail.com>2015-09-10 15:14:24 +0300
commitc87a58fe4b5c2f64ecd1ad3697bdb0403c76af4c (patch)
tree5f3d00e692f01c728d457cd7c999daf5b485af50 /src/libsyntax/parse
parent0e96c2823649b92fee835046e7073e428408931a (diff)
downloadrust-c87a58fe4b5c2f64ecd1ad3697bdb0403c76af4c.tar.gz
rust-c87a58fe4b5c2f64ecd1ad3697bdb0403c76af4c.zip
libsyntax: minor clean up
Escape `{` in format strings as `{{`, instead of using a substitution
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 543ca885110..a1ea5daf063 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -4731,8 +4731,8 @@ impl<'a> Parser<'a> {
             (fields, Some(ast::DUMMY_NODE_ID))
         } else {
             let token_str = self.this_token_to_string();
-            return Err(self.fatal(&format!("expected `where`, `{}`, `(`, or `;` after struct \
-                                            name, found `{}`", "{", token_str)))
+            return Err(self.fatal(&format!("expected `where`, `{{`, `(`, or `;` after struct \
+                                            name, found `{}`", token_str)))
         };
 
         Ok((class_name,
@@ -4760,8 +4760,8 @@ impl<'a> Parser<'a> {
             try!(self.bump());
         } else {
             let token_str = self.this_token_to_string();
-            return Err(self.fatal(&format!("expected `where`, or `{}` after struct \
-                                name, found `{}`", "{",
+            return Err(self.fatal(&format!("expected `where`, or `{{` after struct \
+                                name, found `{}`",
                                 token_str)));
         }