-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
rustdoc: sidebar generation code duplicates logic #138576
Copy link
Copy link
Open
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I recently discovered this in #138574, when I fixed the bug for the main page, but the erroneous items were still in the sidebar.
If we simply collected a list of sidebar items during rendering of the main page, almost the entirety of
sidebar.rscould be removed. This could even be done incrementally, with eachsidebar_*function being replaced with a field onContext.