-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
rustdoc: Get rid of CURRENT_DEPTH thread-local variable #82742
Copy link
Copy link
Closed
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.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.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.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.
It turns out
CURRENT_DEPTHhas been around as a thread-local since the beginning of the rustdoc HTML backend, so it's very hard to get rid of it. The issue is that it turns out so many places in rustdoc implicitly depend on it, so threading (haha, get it?) it through all the functions is very tedious.cc https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/what.20is.20CURRENT_DEPTH