undocumented_unsafe_blocks
doesn't recognise safety comments before const
s in impl
blocks
#12720
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
undocumented_unsafe_blocks
lints on documentedunsafe
blocks that constitute the body of aconst
in animpl
block.I get the expected behaviour if I put both the unsafe block and the safety comment into a block expression, or if I remove the item from the
impl
block.Lint Name
undocumented_unsafe_blocks
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
No output.
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: