Clean up span in non-trailing ..
suggestion
This commit is contained in:
parent
423291f14b
commit
66a2c39290
2 changed files with 6 additions and 6 deletions
|
@ -3956,7 +3956,7 @@ impl<'a> Parser<'a> {
|
|||
);
|
||||
err.emit();
|
||||
}
|
||||
self.bump(); // `..` || `...`:w
|
||||
self.bump(); // `..` || `...`
|
||||
|
||||
if self.token == token::CloseDelim(token::Brace) {
|
||||
etc_span = Some(etc_sp);
|
||||
|
@ -3976,7 +3976,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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue