Fix false positive with missing_docs and #[test]
Since #130025, the compiler don't ignore missing_docs when compiling the tests. But there is now a false positive warning for every `#[test]` For example, this code ```rust //! Crate docs fn just_a_test() {} ``` Would emit this warning when running `cargo test` ``` warning: missing documentation for a constant --> src/lib.rs:5:1 | 4 | #[test] | ------- in this procedural macro expansion 5 | fn just_a_test() {} | ^^^^^^^^^^^^^^^^^^^ ```
This commit is contained in:
parent
4c5fc2c334
commit
6eddbb704e
3 changed files with 8 additions and 0 deletions
|
|
@ -3,3 +3,6 @@
|
|||
|
||||
//@ check-pass
|
||||
//@ compile-flags: --test -Dmissing_docs
|
||||
|
||||
#[test]
|
||||
fn test() {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue