Skip to content

Link to private item warning irrelevant in binary crates #89600

@Ploppz

Description

@Ploppz

I get this warning in my binary crate

warning: public documentation for `Poller` links to private item `Poller::revive_dead_jobs`
  --> src/periodic_tasks/poller.rs:48:12
   |
48 | /// Next, [Poller::revive_dead_jobs] is called, which compares jobs registered in the database with
   |            ^^^^^^^^^^^^^^^^^^^^^^^^ this item is private
   |
   = note: this link resolves only because you passed `--document-private-items`, but will break without

However, cargo doc by defaults actually documents private items (which I find perfectly reasonable, as this documentation is specifically for other developers to understand the internals).

My suggestion is that binary crates should default to #![allow(rustdoc::private_intra_doc_links)].

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions