about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2018-05-30 11:04:39 -0700
committerEsteban Küber <esteban@kuber.com.ar>2018-06-05 08:48:55 -0700
commitd66d35bb9184b7f3a4e155386ca44410c0d09ff2 (patch)
tree96e19f423d24963129f610a4149bdefc84cec3ea /src/libsyntax
parentcbc70a0d68bae1d439eb679676c499d543e61396 (diff)
downloadrust-d66d35bb9184b7f3a4e155386ca44410c0d09ff2.tar.gz
rust-d66d35bb9184b7f3a4e155386ca44410c0d09ff2.zip
Account for comma in suggestion
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/parse/parser.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index fb2aa0e9d5a..d1529347ee0 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -3868,7 +3868,7 @@ impl<'a> Parser<'a> {
                     "move the `..` to the end of the field list",
                     vec![
                         (etc_span, "".into()),
-                        (self.span, ", .. }".into()),
+                        (self.span, format!("{}.. }}", if ate_comma { "" } else { ", " })),
                     ],
                 );
             }