diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2018-11-29 13:10:54 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-29 13:10:54 +0100 |
| commit | 3b64f86beb82b78496a5d5fe3c43944ef7ebd95d (patch) | |
| tree | 2a1c29c05f2b36c1b7f7d0a9d4e9d4df759ac583 /src/libsyntax/parse/parser.rs | |
| parent | 1fe2085441c5c9afc1523c19c1c1ddbf86bae462 (diff) | |
| parent | 66a2c39290daddf8cc32284fe635591b9dde4b0a (diff) | |
| download | rust-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/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 4 |
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 { |
