Skip to content

Do not autofix comments containing bare CR #15175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 29, 2025

Conversation

samueltardieu
Copy link
Member

@samueltardieu samueltardieu commented Jun 29, 2025

When a bare CR is present in a four slashes comment, keep triggering the lint but do not issue a fix suggestion as bare CRs are not supported in doc comments. An extra note is added to the diagnostic to warn the user about it.

I have put the test in a separate file to make it clear that the bare CR is not a formatting error.

Fixes #15174

changelog: [four_forward_slashes]: warn about bare CR in comment, and do not propose invalid autofix

@rustbot
Copy link
Collaborator

rustbot commented Jun 29, 2025

r? @llogiq

rustbot has assigned @llogiq.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jun 29, 2025
@samueltardieu
Copy link
Member Author

r? clippy

@rustbot rustbot assigned blyxyas and unassigned llogiq Jul 28, 2025
Copy link
Member

@blyxyas blyxyas left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! ❤️

@blyxyas blyxyas added this pull request to the merge queue Jul 29, 2025
Merged via the queue into rust-lang:master with commit c7dd98c Jul 29, 2025
11 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jul 29, 2025
@samueltardieu samueltardieu deleted the issue-15174 branch July 29, 2025 18:32
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.

four_forward_slashes does not know that doc comments cannot contain "bare CR"
4 participants