auto merge of #9299 : alexcrichton/rust/fmt-trailing-comma, r=huonw
This is more consistent with other parts of the language and it also makes it easier to use in situations where format string is massive.
This commit is contained in:
commit
da29a8e6be
2 changed files with 5 additions and 0 deletions
|
|
@ -76,6 +76,7 @@ impl Context {
|
|||
self.ecx.span_err(sp, "expected token: `,`");
|
||||
return (extra, None);
|
||||
}
|
||||
if *p.token == token::EOF { break } // accept trailing commas
|
||||
if named || (token::is_ident(p.token) &&
|
||||
p.look_ahead(1, |t| *t == token::EQ)) {
|
||||
named = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue