Skip to content

rustdoc: Get rid of CURRENT_DEPTH thread-local variable #82742

Closed
@camelid

Description

@camelid

It turns out CURRENT_DEPTH has 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

Metadata

Metadata

Assignees

Labels

C-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.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