rustdoc: private items get broken_intra_doc_links
warning even when using --document-private-items
#115788
Labels
A-intra-doc-links
Area: Intra-doc links, the ability to link to items in docs by name
A-lint
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-bug
Category: This is a bug.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
Code
Current output
In addition to the warning, the link shows up as unformatted text (including the square brackets) rather than as a hyperlink.
Desired output
No warning, and a hyperlink in the resulting HTML rather than unlinked text.
Rationale and extra context
It's surprising that the link is unresolved, considering that the item linked to has a valid path, and a documentation page has been generated for it! If I were to manually write out the path of the generated HTML file, the link would work.
Anything else?
My project has this problem in the current trunk revision:
The project is not a library, so all the documentation is there to help others understand the code. I set
--document-private-items
using.cargo/config.toml
; if I didn't use that flag, the generated documentation would be useless. I make extensive use of intra-doc links to explain how different components fit together.The text was updated successfully, but these errors were encountered: