-
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
lib.rs:
/// A!
///
/// # Errors
///
/// None?
pub struct A;
/// [x][A], [y][A#errors], [z]
///
/// [z]: A#errors
pub struct B;
The documentation of B is rendered by rustdoc as ` x, [y][A#errors], z `, in which the x link correctly points to the documentation of A as expected, the y link is unrendered, and the z link points to href="A#errors".
I would expect both y and z to have href="struct.A.html#errors".
Mentioning the tracking issue: #43466
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.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
dtolnay commentedon Jul 20, 2019
Importantly, this should take into account the deduplication of anchors on the same page. In the following, [A#errors] should go to struct.A.html#errors and [A::f#errors] should go to struct.A.html#errors-1 (which is how the anchor is deduplicated today).
Auto merge of #66675 - GuillaumeGomez:support-anchors-intra-doc-links…
near
(gated under__macro_docs
feature) module to#[near]
macro doc (with link) near/near-sdk-rs#1289