Respect --file-lines when making various whitespace-related changes.#6841
Respect --file-lines when making various whitespace-related changes.#6841martinboehme wants to merge 1 commit intorust-lang:mainfrom
--file-lines when making various whitespace-related changes.#6841Conversation
|
Edit: Disregard. PR is ready for review now. Please hold off on reviewing for now. While tests previously passed for me, I see that they are now failing, for reasons that aren't clear to me. |
|
Checking the logs shows that the Specifically I see: Mismatch at tests/source/issue-5136-3.rs:4:
// Important: When editing this file, make sure not to add a newline at the end
// of the last line.
use std;
+Mismatch at tests/target/issue-5136-3.rs:4:
// Important: When editing this file, make sure not to add a newline at the end
// of the last line.
use std;
+ |
Yes, thanks. See also my previous comment:
I'm investigating and will let you know when the PR is ready to review. Sorry for the noise. |
|
The issue is now fixed. I had removed part of the code that I had thought I had convinced myself was not needed -- obviously, this was not the case. I have now reinstated the code, and the tests pass. |
This comment has been minimized.
This comment has been minimized.
Various whitespace-related changes did not so far respect `--file-lines`, see also [rust-lang#5136](tests/target/issue-5136-4.rs). This PR fixes this in all of the cases reported in rust-lang#5136: * Newlines at the beginning of the file * Spaces at the beginning of the file * Missing newline at the end of the file * Space after a doc comment * Space before a comment in the last line of the file (without trailing newline) The PR includes tests that fail without the fixes.
ec24856 to
79a23d2
Compare
|
This PR was rebased onto a different main 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. |
|
I've resolved the merge conflicts and, in the process, squashed the previously multiple commits into one. |
Various whitespace-related changes did not so far respect
--file-lines, see also #5136. This PR fixes this in all of the cases reported in #5136:The PR includes tests that fail without the fixes.