undocumented_unsafe_blocks
can be broken by rustfmt
#13024
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Summary
Consider the following code:
Normally,
rustfmt
will either leave theunsafe
block as above or convert this into the following, depending on its length:However, in rare cases, if
/* ... */
is exactly the right length,rustfmt
will emit:Which breaks the
undocumented_unsafe_blocks
lint, since the comment isn't immediately before the line withunsafe
. It should accept cases like this.Lint Name
undocumented_unsafe_blocks
The text was updated successfully, but these errors were encountered: