Closed
Description
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