Skip to content

rustdoc: Tracking Issue for improved item code blocks #75303

@RDambrosio016

Description

@RDambrosio016

This is a tracking issue for the improved item code blocks feature. Which is aimed at overall improving the quality of code blocks by removing explicit coloring and instead using the syntax highlighter. And also adding hyperlinks to each field (where applicable) which links to the specific section below the declaration. It was initially discussed in #75178 and it was decided it should be multiple PRs.

Note

Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.

A tracking issue is however not meant for large scale discussion, questions, or bug reports.
Instead, open a dedicated issue for the specific matter or post in the #t-rustdoc Zulip channel.

Discussion comments will get marked as off-topic or deleted.
Repeated discussions on the tracking issue may lead to the tracking issue getting locked.

Steps

  • Remove explicit coloring in declaration code blocks and use the syntax highlighter.
  • Add hyperlinks for enum variants.
  • Add hyperlinks for pub struct fields.
  • Add hyperlinks for union fields.
  • Add hyperlinks for fields inside enum struct variants.

Unresolved Questions

  • Trait declarations seem to run the highlighter, but not completely, only for methods. Should we remove this and run the highlighter on the whole thing?

Implementation history

#75178 Initial closed pr with the discussion about this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCS-tracking-unimplementedStatus: The feature has not been implemented.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