missing_docs_in_private_items
: false negative when used with clap derive
#13996
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
Summary
I don't really understand this bug, so sorry about the bad title. If someone figures out why it's not working, feel free to add a better title. I'm also not sure how to minimize the example any further.
The private function
foo
without doc comments immediately after theCli
struct doesn't trigger themissing_docs_in_private_items
lint. If you remove theargs
fromCli
, then the lint does correctly trigger onfoo
. It seems like the clap derive is breaking the lint in some way, but this seems like a bug in the lint rather than a bug in clap.I've reproduced this on nightly and the latest stable 1.84. I've tried looking at the output of
cargo rustc --profile=check -- -Zunpretty=expanded
but nothing stands out to me.Lint Name
missing_docs_in_private_items
Reproducer
I tried this code:
I expected to see this happen:
Instead, this happened:
Version
The text was updated successfully, but these errors were encountered: