Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 2 Packages Projects Releases Wiki Activity
Files
master
rust/tests/ui/lint/lint-missing-doc-test.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
198 B
Rust
Raw Permalink Normal View History

Allow `missing_docs` lint on the generated test harness
2024-09-09 13:43:25 +02:00
//! This test checks that denying the missing_docs lint does not trigger
//! on the generated test harness.
//@ check-pass
Use `doc(hidden)` instead of `allow(missing_docs)` in the test harness So that it doesn't fail with `forbid(missing_docs)` Fixes #130218
2024-09-11 12:08:14 +02:00
//@ compile-flags: --test
#![forbid(missing_docs)]
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() {} | ^^^^^^^^^^^^^^^^^^^ ```
2024-09-11 10:35:02 +02:00
#[test]
fn test() {}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 603ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API