Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo test breaking with forbid(missing_docs) #130218

Closed
y86-dev opened this issue Sep 11, 2024 · 0 comments · Fixed by #130219
Closed

cargo test breaking with forbid(missing_docs) #130218

y86-dev opened this issue Sep 11, 2024 · 0 comments · Fixed by #130219
Labels
A-libtest Area: `#[test]` / the `test` library A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. C-bug Category: This is a bug.

Comments

@y86-dev
Copy link
Contributor

y86-dev commented Sep 11, 2024

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
@y86-dev y86-dev added the C-bug Category: This is a bug. label Sep 11, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Sep 11, 2024
@Urgau Urgau linked a pull request Sep 11, 2024 that will close this issue
@bors bors closed this as completed in cc34d64 Sep 11, 2024
@saethlin saethlin added A-libtest Area: `#[test]` / the `test` library A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Sep 12, 2024
shrirambalaji pushed a commit to shrirambalaji/rust that referenced this issue Oct 6, 2024
So that it doesn't fail with `forbid(missing_docs)`

Fixes rust-lang#130218
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-libtest Area: `#[test]` / the `test` library A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. C-bug Category: This is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants