You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
ExpHP
changed the title
When there are extraneous semicolons, only one is deleted at a time
When there are multiple extraneous semicolons, only one is deleted at a time
Jun 16, 2018
A simple println! debugging shows that the span for let in the above example includes the semicolon up to the second one (let x = 2;;). I do not know the exact specification of rust syntax, so I cannot tell whether this is a bug or not. However, in case of other statements like foo();;, the span does not include the second semicolon, so I assume that this is a bug which should be fixed in libsyntax side.
…ocal-span, r=petrochenkov
Do not consume semicolon twice while parsing local statement
The span for a `let` statement includes multiple semicolons. For example,
```rust
let x = 2;;;
// ^^^^^^^^^^^ The span for the above statement.
```
This PR fixes it.
cc rust-lang/rustfmt#2791.
This is an example of non-idempotent formatting:
is formatted to
which is formatted to
etc.
The text was updated successfully, but these errors were encountered: