Skip to content

Commit 3d225a5

Browse files
committed
Auto merge of #132886 - fmease:rustdoc-perf-clean-middle-args, r=GuillaumeGomez
[perf] rustdoc: Perform less work when cleaning middle::ty parenthesized generic args CC #132697. I presume the perf regression it caused (if real) boils down to query invocation overhead, namely of `def_kind` & `trait_def` as we don't seem to be decoding more often from the crate metadata. I won't try the obvious and reduce the amount of query calls by threading information via params as that would render the code awkward. So instead I'm simply trying to attack some low-hanging fruits in the vicinity. --- Previously, we would `clean_middle_generic_args` *unconditionally* inside `clean_middle_generic_args_with_constraints` even though we didn't actually use its result for parenthesized generic args (`Trait(...) -> ...`). Now, we only call `clean_middle_generic_args` when necessary. Lastly, I've simplified `clean_middle_generic_args_with_constraints`. --- r? ghost
2 parents 7fb749b + 9a60ff6 commit 3d225a5

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)