diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2025-03-26 22:03:17 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-26 22:03:17 +0000 |
| commit | c4789a014f840dacc13073698aa2d2b1a895867e (patch) | |
| tree | 5ee7cb0272a52cad567338d4a771fa76435fc8e4 /tests/rustdoc-js-std/parser-errors.js | |
| parent | fe4dd5b92e603555594b9abef58405fc9f4f260e (diff) | |
| parent | 9b1945d9fb57516c585f7aea9dfe638ad3c7a397 (diff) | |
| download | rust-c4789a014f840dacc13073698aa2d2b1a895867e.tar.gz rust-c4789a014f840dacc13073698aa2d2b1a895867e.zip | |
Prevent including preceeding whitespaces if line contains non blanks (#14480)
This extra condition prevents a problem when removing the '}' in:
```rust
( // There was an opening bracket after the parenthesis, which has been removed
// This is a comment
})
```
Removing the whitespaces, including the linefeed, before the '}', would
put the closing parenthesis at the end of the `// This is a comment`
line, which would make it part of the comment as well. In this case, it
is best to keep the span on the '}' alone.
changelog: none
Note to reviewer: `manual_inspect` and `collapsible_if` were two lints
exhibiting this problem in cooked up test cases, which have been
included as non-regression tests.
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions
