diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2025-03-26 19:38:09 +0100 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2025-03-26 21:10:09 +0100 |
| commit | 9b1945d9fb57516c585f7aea9dfe638ad3c7a397 (patch) | |
| tree | 5ee7cb0272a52cad567338d4a771fa76435fc8e4 /tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs | |
| parent | fe4dd5b92e603555594b9abef58405fc9f4f260e (diff) | |
| download | rust-9b1945d9fb57516c585f7aea9dfe638ad3c7a397.tar.gz rust-9b1945d9fb57516c585f7aea9dfe638ad3c7a397.zip | |
Prevent including preceeding whitespaces if line contains non blanks
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.
Diffstat (limited to 'tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions
