Skip to content

Commit c87a58f

Browse files
committed
libsyntax: minor clean up
Escape `{` in format strings as `{{`, instead of using a substitution
1 parent 0e96c28 commit c87a58f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libsyntax/parse/parser.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -4731,8 +4731,8 @@ impl<'a> Parser<'a> {
47314731
(fields, Some(ast::DUMMY_NODE_ID))
47324732
} else {
47334733
let token_str = self.this_token_to_string();
4734-
return Err(self.fatal(&format!("expected `where`, `{}`, `(`, or `;` after struct \
4735-
name, found `{}`", "{", token_str)))
4734+
return Err(self.fatal(&format!("expected `where`, `{{`, `(`, or `;` after struct \
4735+
name, found `{}`", token_str)))
47364736
};
47374737

47384738
Ok((class_name,
@@ -4760,8 +4760,8 @@ impl<'a> Parser<'a> {
47604760
try!(self.bump());
47614761
} else {
47624762
let token_str = self.this_token_to_string();
4763-
return Err(self.fatal(&format!("expected `where`, or `{}` after struct \
4764-
name, found `{}`", "{",
4763+
return Err(self.fatal(&format!("expected `where`, or `{{` after struct \
4764+
name, found `{}`",
47654765
token_str)));
47664766
}
47674767

0 commit comments

Comments
 (0)