rustdoc: cross-crate re-exports: correctly render late-bound params in source order even if early-bound params are present#121022
Conversation
|
Let's see how bad perf is for the unoptimized version. However, the benchmark suite might not properly cover this scenario. @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
…-src-order, r=<try> rustdoc: cross-crate re-exports: correctly render late-bound params in source order even if early-bound params are present r? ghost
|
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (7d7a418): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 662.695s -> 662.981s (0.04%) |
|
Spurious, not a |
c19c531 to
d4a5de3
Compare
| // edition:2021 | ||
|
|
||
| // @has usr/fn.f.html | ||
| // @has - '//pre[@class="rust item-decl"]' "fn f<'a, 'b, 'c, 'd, T, const N: usize>(_: impl Copy)" |
There was a problem hiding this comment.
Both items used to be rendered like
pub fn f<'b, 'd, T, const N: usize, 'a, 'c>(_: impl Copy)|
Some changes occurred in src/librustdoc/clean/types.rs cc @camelid |
|
r? rustdoc |
|
Eh, since I changed some things around, let's check perf again. |
This comment has been minimized.
This comment has been minimized.
…-src-order, r=<try> rustdoc: cross-crate re-exports: correctly render late-bound params in source order even if early-bound params are present r? ghost
|
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (13dfdc4): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 635.176s -> 636.701s (0.24%) |
src/librustdoc/clean/types.rs
Outdated
|
|
||
| #[derive(Clone, PartialEq, Eq, Debug, Hash)] | ||
| pub(crate) struct GenericParamDef { | ||
| pub(crate) did: DefId, |
There was a problem hiding this comment.
Nitpicking: please use def_id. We tend to use this over did in rustdoc as much as we can and I'd like this trend to continue. :)
src/librustdoc/clean/types.rs
Outdated
| impl GenericParamDef { | ||
| pub(crate) fn lifetime(name: Symbol) -> Self { | ||
| Self { name, kind: GenericParamDefKind::Lifetime { outlives: ThinVec::new() } } | ||
| pub(crate) fn lifetime(did: DefId, name: Symbol) -> Self { |
|
Looks good to me! Just a nit and it'll be ready to go. :) |
…n source order even if early-bound params are present
d4a5de3 to
a8d869e
Compare
|
@bors r=GuillaumeGomez rollup |
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#111106 (Add known issue of let binding to format_args doc) - rust-lang#118749 (Make contributing to windows bindings easier) - rust-lang#120982 (Add APIs for fetching foreign items ) - rust-lang#121022 (rustdoc: cross-crate re-exports: correctly render late-bound params in source order even if early-bound params are present) - rust-lang#121082 (Clarified docs on non-atomic oprations on owned/mut refs to atomics) - rust-lang#121084 (Make sure `tcx.create_def` also depends on the forever red node, instead of just `tcx.at(span).create_def`) - rust-lang#121098 (Remove unnecessary else block from `thread_local!` expanded code) - rust-lang#121105 (Do not report overflow errors on ConstArgHasType goals) - rust-lang#121116 (Reinstate some delayed bugs.) - rust-lang#121122 (Enforce coroutine-closure layouts are identical) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#121022 - fmease:rustdoc-x-crate-late-bound-lt-src-order, r=GuillaumeGomez rustdoc: cross-crate re-exports: correctly render late-bound params in source order even if early-bound params are present r? ghost
r? ghost