Rollup merge of #56330 - estebank:cleanup-span, r=zackmdavis

Clean up span in non-trailing `..` suggestion
This commit is contained in:
Guillaume Gomez 2018-11-29 13:10:54 +01:00 committed by GitHub
commit 3b64f86beb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View file

@ -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 {