Skip to content

Self on its own does not resolve in intra-doc links #77732

Closed
@jyn514

Description

I tried this code:

/// [Self]
pub struct S { u: usize }

I expected to see this happen: The link behaves the same as struct@S

Instead, this happened: Rustdoc says the link failed to resolve:

warning: unresolved link to `Self`
 --> s.rs:1:6
  |
1 | /// [Self]
  |      ^^^^ the module `s` contains no item named `Self`

Note that Self::u resolves fine.

Meta

rustdoc --version:

rustdoc 1.48.0-nightly (ef663a8a4 2020-09-30)

Metadata

Assignees

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