about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2018-11-29 13:10:54 +0100
committerGitHub <noreply@github.com>2018-11-29 13:10:54 +0100
commit3b64f86beb82b78496a5d5fe3c43944ef7ebd95d (patch)
tree2a1c29c05f2b36c1b7f7d0a9d4e9d4df759ac583 /src/libsyntax/parse
parent1fe2085441c5c9afc1523c19c1c1ddbf86bae462 (diff)
parent66a2c39290daddf8cc32284fe635591b9dde4b0a (diff)
downloadrust-3b64f86beb82b78496a5d5fe3c43944ef7ebd95d.tar.gz
rust-3b64f86beb82b78496a5d5fe3c43944ef7ebd95d.zip
Rollup merge of #56330 - estebank:cleanup-span, r=zackmdavis
Clean up span in non-trailing `..` suggestion
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index e0436cc7380..506199b60ad 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -3952,7 +3952,7 @@ impl<'a> Parser<'a> {
                     );
                     err.emit();
                 }
-                self.bump();  // `..` || `...`:w
+                self.bump();  // `..` || `...`
 
                 if self.token == token::CloseDelim(token::Brace) {
                     etc_span = Some(etc_sp);
@@ -3972,7 +3972,7 @@ impl<'a> Parser<'a> {
                     ate_comma = true;
                 }
 
-                etc_span = Some(etc_sp);
+                etc_span = Some(etc_sp.until(self.span));
                 if self.token == token::CloseDelim(token::Brace) {
                     // If the struct looks otherwise well formed, recover and continue.
                     if let Some(sp) = comma_sp {