unnecessary_safety_comment
false positive in _ = unsafe { foo_unsafe() }
expression, conflicts with undocumented_unsafe_blocks
correct analysis
#13039
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
The
unnecessary_safety_comment
lint considers a safety comment as being unnecessary if the code is of the shape:The following alternative shape is correctly identified as requiring a safety comment:
The
undocumented_unsafe_blocks
lint expects a safety comment in both cases, so the first case cannot pass Clippy check if both lints are enabled.Lint Name
unnecessary_safety_comment
Reproducer
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: