Skip to content

Anchors in intra doc link #62833

Closed
Closed
@dtolnay

Description

@dtolnay

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

Labels

A-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameC-bugCategory: This is a bug.T-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