libsyntax: minor clean up
Escape `{` in format strings as `{{`, instead of using a substitution
This commit is contained in:
parent
0e96c28236
commit
c87a58fe4b
1 changed files with 4 additions and 4 deletions
|
@ -4731,8 +4731,8 @@ impl<'a> Parser<'a> {
|
||||||
(fields, Some(ast::DUMMY_NODE_ID))
|
(fields, Some(ast::DUMMY_NODE_ID))
|
||||||
} else {
|
} else {
|
||||||
let token_str = self.this_token_to_string();
|
let token_str = self.this_token_to_string();
|
||||||
return Err(self.fatal(&format!("expected `where`, `{}`, `(`, or `;` after struct \
|
return Err(self.fatal(&format!("expected `where`, `{{`, `(`, or `;` after struct \
|
||||||
name, found `{}`", "{", token_str)))
|
name, found `{}`", token_str)))
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok((class_name,
|
Ok((class_name,
|
||||||
|
@ -4760,8 +4760,8 @@ impl<'a> Parser<'a> {
|
||||||
try!(self.bump());
|
try!(self.bump());
|
||||||
} else {
|
} else {
|
||||||
let token_str = self.this_token_to_string();
|
let token_str = self.this_token_to_string();
|
||||||
return Err(self.fatal(&format!("expected `where`, or `{}` after struct \
|
return Err(self.fatal(&format!("expected `where`, or `{{` after struct \
|
||||||
name, found `{}`", "{",
|
name, found `{}`",
|
||||||
token_str)));
|
token_str)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue