Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
camelid opened this issue Mar 4, 2021 · 1 comment · Fixed by #84288
Closed

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

camelid opened this issue Mar 4, 2021 · 1 comment · Fixed by #84288
Assignees
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@camelid
Copy link
Member

camelid commented Mar 4, 2021

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

@camelid camelid added C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. E-hard Call for participation: Hard difficulty. Experience needed to fix: A lot. labels Mar 4, 2021
@camelid camelid self-assigned this Mar 4, 2021
@jyn514
Copy link
Member

jyn514 commented Mar 4, 2021

This is tedious, but I don't expect it to be particularly hard.

@rustbot label: -E-hard +E-medium

@rustbot rustbot added E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. and removed E-hard Call for participation: Hard difficulty. Experience needed to fix: A lot. labels Mar 4, 2021
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Apr 18, 2021
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Apr 18, 2021
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Apr 18, 2021
@bors bors closed this as completed in 8108e17 Apr 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
3 participants