Skip to content

cargo test breaking with forbid(missing_docs) #130218

Closed

Description

@BennoLossin

I tried this code:

//! Provides a noop.

#![forbid(missing_docs)]

/// Does nothing
pub fn noop() {}

in lib.rs.

I expected to see this happen: successful cargo test invocation.

Instead, this happened: cargo test errors:

$ cargo test
   Compiling rust v0.0.0 (/tmp/noop)
error[E0453]: allow(missing_docs) incompatible with previous forbid

For more information about this error, try `rustc --explain E0453`.
error: could not compile `rust` (lib test) due to 1 previous error

Meta

This was triggered today in my daily testing pipeline using nightly. cargo check reports no issues.

rustc --version --verbose:

rustc 1.83.0-nightly (0ee7cb5e3 2024-09-10)
binary: rustc
commit-hash: 0ee7cb5e3633502d9a90a85c3c367eccd59a0aba
commit-date: 2024-09-10
host: x86_64-unknown-linux-gnu
release: 1.83.0-nightly
LLVM version: 19.1.0

Activity

  1. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Sep 11, 2024
  2. added a commit that references this issue on Sep 11, 2024
    cc34d64
  3. added
    A-libtestArea: `#[test]` / the `test` library
    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.
    and removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Sep 12, 2024
  4. added a commit that references this issue on Oct 6, 2024
    bf90449
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-libtestArea: `#[test]` / the `test` libraryA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions