close
Skip to content

Don't format statements that are outside of the selected file-lines range#6867

Merged
ytmimi merged 3 commits into
rust-lang:mainfrom
randomPoison:issue-6863-file-lines-above
Apr 17, 2026
Merged

Don't format statements that are outside of the selected file-lines range#6867
ytmimi merged 3 commits into
rust-lang:mainfrom
randomPoison:issue-6863-file-lines-above

Conversation

@randomPoison

Copy link
Copy Markdown
Contributor

Fix for #6863. Check if a statement is covered by --file-lines before formatting it, preserving the original source snippet, including the preceding whitespace, if the statement is not selected.

@rustbot rustbot added the S-waiting-on-review Status: awaiting review from the assignee but also interested parties. label Apr 16, 2026

@ytmimi ytmimi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation seems very straightforward. Thanks for identifying and working on this.

View changes since this review

@ytmimi
ytmimi merged commit e28eb9e into rust-lang:main Apr 17, 2026
26 checks passed
@rustbot rustbot added release-notes Needs an associated changelog entry and removed S-waiting-on-review Status: awaiting review from the assignee but also interested parties. labels Apr 17, 2026
@randomPoison
randomPoison deleted the issue-6863-file-lines-above branch April 17, 2026 23:50
@ytmimi ytmimi added release-notes Needs an associated changelog entry and removed release-notes Needs an associated changelog entry labels Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants