Following the advice of doc_include_without_cfg
causes missing_docs
to trigger instead
#13918
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 crate I'm working on had this for its crate documentation:
#![doc = include_str!("../README.md")]
I came across the
doc_include_without_cfg
lint and thought it made sense, so I turned it on and followed its suggestion, changing the above tobut now, the
missing_docs
lint triggers instead:Lint Name
doc_include_without_cfg
Reproducer
I tried this code:
#![cfg_attr(doc, doc = include_str!("../README.md"))]
I saw this happen:
I expected to see this happen:
I expected
clippy
to be smart enough to understand its own suggested lint fix and realize that the crate does, in fact, have documentation due to thedoc = include_str!
.Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: