Remove most trailing whitespace across cargo (particularly markdown) - #17358
Conversation
|
r? @weihanglo rustbot has assigned @weihanglo. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
Regularly, people send in PRs, and their editor introduces unrelated changes by removing trailing whitespace. Proactively remove trailing whitespace from most markdown files and rust source. This leaves unmodified the trailing spaces in: - Test snapshot output, because while we could represent the correct form, the snapshot testing tool won't use that format - Generated files - Manpages input, which we can handle in another pass
68b5ef8 to
1d864ca
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
| --- | ||
| fn main() {} | ||
| "#, | ||
| "--- cargo \n\ |
There was a problem hiding this comment.
Did this change because the trailing --- cargo after infostring? Can we remove only that trailing instead?
There was a problem hiding this comment.
@weihanglo That would change what this test is testing; given the name of the test, I think it's trying to test whitespace here.
There was a problem hiding this comment.
Did this need to happen? rustfmt handles trailing whitespace so we shouldn't need to police it and it is annoying to work with source in this style. Every time I see code like this, I switch it away from it.
There was a problem hiding this comment.
I think Json was looking from an editor's angle. I am fine with either, though I agree with Ed that the old style is way readable.
7aace91 to
b3b4fdb
Compare
Update cargo submodule 6 commits in eb98b54bc9f3c74519f43d066cb3fd02ebc88df0..8a0d8afba810304bcf9a10bac430be80dd470233 2026-08-11 16:00:29 +0000 to 2026-08-15 01:32:53 +0000 - chore: update to cc@1.4.3 (rust-lang/cargo#17364) - Remove most trailing whitespace across cargo (particularly markdown) (rust-lang/cargo#17358) - Remove unremap file when running cargo clean -p in new build-dir layout (rust-lang/cargo#17356) - fix(update)!: Remove unstable `--breaking` (rust-lang/cargo#17333) - docs: adopt rust-lang/rust's LLM usage policy (rust-lang/cargo#17330) - fix(min-publish-age): remove `registry.min-publish-age` (rust-lang/cargo#17353) r? ghost
Update cargo submodule 6 commits in eb98b54bc9f3c74519f43d066cb3fd02ebc88df0..8a0d8afba810304bcf9a10bac430be80dd470233 2026-08-11 16:00:29 +0000 to 2026-08-15 01:32:53 +0000 - chore: update to cc@1.4.3 (rust-lang/cargo#17364) - Remove most trailing whitespace across cargo (particularly markdown) (rust-lang/cargo#17358) - Remove unremap file when running cargo clean -p in new build-dir layout (rust-lang/cargo#17356) - fix(update)!: Remove unstable `--breaking` (rust-lang/cargo#17333) - docs: adopt rust-lang/rust's LLM usage policy (rust-lang/cargo#17330) - fix(min-publish-age): remove `registry.min-publish-age` (rust-lang/cargo#17353) r? ghost
Regularly, people send in PRs, and their editor introduces unrelated
changes by removing trailing whitespace.
Proactively remove trailing whitespace from most markdown files and rust
source.
This leaves unmodified the trailing spaces in:
form, the snapshot testing tool won't use that format