-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Rework undocumented_unsafe_blocks
#8450
Conversation
r? @giraffate (rust-highfive has picked a reviewer for you, use r? to override) |
96ae551
to
f2d4327
Compare
f2d4327
to
ac04157
Compare
ac04157
to
65f96e2
Compare
undocumented_unsafe_blocks
undocumented_unsafe_blocks
This should be good to go now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the comment about style that are no longer supported be added to What it does
section on this lint?
@@ -89,11 +93,6 @@ fn block_comment_newlines() { | |||
unsafe {} | |||
} | |||
|
|||
#[rustfmt::skip] | |||
fn inline_block_comment() { | |||
/* Safety: */unsafe {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to leave this as it is and add comments not to support this style.
@bors r+ It looks good, thanks! |
📌 Commit 17c8bee has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
fixes: #8264
fixes: #8449
One thing came up while working on this. Currently comments on the same line are supported like so:
Is this worth supporting at all? Anything other than a couple of words doesn't really fit well.
edit: zulip topic
changelog: Don't lint
undocumented_unsafe_blocks
when the unsafe block comes from a proc-macro.changelog: Don't lint
undocumented_unsafe_blocks
when the preceding line has a safety comment and the unsafe block is a sub-expression.