Skip to content

rustdoc: link implemented methods appropriately #17476

Closed
@nodakai

Description

@nodakai

Example: we see char implements the Char trait which provides encode_utf8():

However it isn't easy to browse to its description; Curretnly we must

  1. move up to the line of impl Char for char,
  2. click Char to open a new page,
  3. and then find encode_utf8() in the new page.

We should be able to

  1. just click encode_utf8() to open its description without any manual scrolling

Curretnly encode_utf8() in the char page is linked to itself. Perhaps the intention was to provide an easy way for a person reading it with a web browser to copy the link into the OS clipboard. However it is a less likely use case than to try to read the description of each trait method. I think it is convenient enought to link the char part of the impl Char for char line to the same line.

Metadata

Metadata

Assignees

Labels

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