diff options
| author | bors <bors@rust-lang.org> | 2013-09-19 07:06:04 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-09-19 07:06:04 -0700 |
| commit | da29a8e6be0af399ef8b350fa4b6d124d2610bf7 (patch) | |
| tree | c8b3c6c30cef5df1a9cbb9b02762fb8fb0c5b697 /src/libsyntax/ext | |
| parent | 99ec14dbb0c6017106f2378bedd35ac256aa0006 (diff) | |
| parent | 040f1c06bc7c1c5fa37477513227114d343b3ec3 (diff) | |
| download | rust-da29a8e6be0af399ef8b350fa4b6d124d2610bf7.tar.gz rust-da29a8e6be0af399ef8b350fa4b6d124d2610bf7.zip | |
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.
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/format.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libsyntax/ext/format.rs b/src/libsyntax/ext/format.rs index 9f4e55b1a92..cace4648df2 100644 --- a/src/libsyntax/ext/format.rs +++ b/src/libsyntax/ext/format.rs @@ -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; |
