Description
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.
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also uses 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 about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
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.