rustdoc: Don't use CURRENT_DEPTH in clean/types.rs#82745
rustdoc: Don't use CURRENT_DEPTH in clean/types.rs#82745camelid wants to merge 1 commit intorust-lang:masterfrom
CURRENT_DEPTH in clean/types.rs#82745Conversation
This part actually wasn't that hard. Ending the use of it in `html/format.rs` is probably going to be *a lot* harder.
| } | ||
|
|
||
| impl<'tcx> Context<'tcx> { | ||
| fn depth(&self) -> usize { |
There was a problem hiding this comment.
I can add docs here if you like. Let me know what you think.
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
|
||
| impl<'tcx> Context<'tcx> { | ||
| fn depth(&self) -> usize { | ||
| self.current.len() |
There was a problem hiding this comment.
I'm confused - did current already exist? How is it kept in sync with CURRENT_DEPTH?
There was a problem hiding this comment.
CURRENT_DEPTH is set to self.current.len() in render_item(). self.current should always be the same when rendering a particular item since it represents the namespace hierarchy.
There was a problem hiding this comment.
I can combine this PR with #82815 if you like so that we don't have to worry about keeping CURRENT_DEPTH in sync with depth().
|
☔ The latest upstream changes (presumably #82756) made this pull request unmergeable. Please resolve the merge conflicts. |
|
It looks like this PR is the first commit of #82815, so I'm going to close this in favor of that PR. Thanks for working on this! |
Helps with #82742.
This part actually wasn't that hard. Ending the use of it in
html/format.rsis probably going to be a lot harder.r? @jyn514