-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Open
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.
Description
The missing_docs
lint does not do anything in test builds. Minimal code example:
#![cfg_attr(test, deny(missing_docs))]
To reproduce, make a new crate, replace src/lib.rs
with the above code, and run cargo test
. The command will run successfully. I would expect the command to report a “missing documentation for crate” compile error.
As for the cause, my wild guess is some sort of interaction between cfg(test)
and which items are detected as public.
Bert-Proesmans, zzeroo, CreepySkeleton, csnover, ia0 and 1 more
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.