-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameArea: Intra-doc links, the ability to link to items in docs by nameC-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Description
With #72771 merged (current nightly, e.g. 1.46.0-nightly (0c03aee8b 2020-07-05)
) , the following code now produces a warning:
struct Private;
pub struct Public {
/// A private field with a [`Private`] type.
private: Private,
}
This triggers intra_doc_link_resolution_failure
:
warning: `[Private]` public documentation for `private` links to a private item
--> src/lib.rs:4:12
|
4 | /// A [`Private`] field.
| ^^^^^^^^^ this item is private
|
= note: `#[warn(intra_doc_link_resolution_failure)]` on by default
But rustdoc never actually generates any links to Private
, because it wasn't run with --document-private-items
. In my opinion it shouldn't emit warning in this case, because documenting the internals can be very useful to contributors or even future me when --document-private-items
is used.
There has already been some discussion at the end of #72771, which is where I asked first about whether this change was intentional.
jyn514, Manishearth, yvt and SOF3
Metadata
Metadata
Assignees
Labels
A-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameArea: Intra-doc links, the ability to link to items in docs by nameC-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.