Closed
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.