unnecessary_safety_doc considered harmful #9986
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
Uh oh!
There was an error while loading. Please reload this page.
Summary
I disagree with the
unnecessary_safety_doc
warning. That's because a function'sSafety
section can document more than just the minimum requirements for calling the function safely. For example:or this real-life example
or this real-life example: https://github.com/asomers/blosc-rs/blob/03c25105e4d1b78af8c1af2cba98f5c390dd7c9c/blosc/src/lib.rs#L363
unsafe
.or
Lint Name
unnecessary_safety_doc
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
No warning
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: