Skip to content

rustdoc: private_doc_tests lint no longer fires on stable #75951

Closed
@ehuss

Description

@ehuss

As of rustc 1.47.0-beta.1, the private_doc_tests lint is no longer working.

#![warn(private_doc_tests)]
/// hi!
/// ```
/// let x = 1;
/// ```
fn f() {}

I expected to see this happen: cargo doc should issue warning: documentation test in private item

Instead, this happened: No warnings emitted.

This appears to have changed in #74855. I don't see any discussion there about this, so I'm guessing it was unintentional.

cc @jyn514.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-doctestsArea: Documentation tests, run by rustdocA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.P-highHigh priorityT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions