unnecessary_safety_comment
does not lint for "orphan" comments
#14556
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-negative
Issue: The lint should have been triggered on code, but wasn't
Uh oh!
There was an error while loading. Please reload this page.
Summary
unnecessary_safety_comment
does not lint for "orphan" comments, i.e. the last (or only) comment.Possibly related: #14553.
Possibly related: #14554.
Possibly related: #14555.
Lint Name
unnecessary_safety_comment
Reproducer
https://godbolt.org/z/GrjxKc9nW
I tried this code:
I expected to see this happen: lint.
Instead, this happened: no lint.
Same if it is a single comment:
Version
The text was updated successfully, but these errors were encountered: