Conversation
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
[WIP] rustdoc: Improve `ItemKind`
75c7db0 to
b15adfe
Compare
Moreover, rename `Function` to `Fn`, `*Method` to `*AssocFn`, `*Type` to `*Ty`, `Constant` to `Const` & `Macro` to `DeclMacro`.
…ssocConst` I had to modify several HTML rendering routines because parameter `parent: ItemType` of fn `render_assoc_item` didn't always refer to the parent container (impl vs trait) since it was actually misused to control the styling (!), namely the indentation & the look of the where-clause, but now with `ProvidedAssocConst` & `ImplAssocConst` merged I needed to know the actual container to determine `AssocConstValue`. `render_assoc_item` previously only used the `parent` param to determine the indentation & `assoc_method` used it to determine the indentation & the style of the where-clause (see enum `Ending`; complete misnomer!). That led to `item_trait` (for rendering trait pages) literally passing `ItemType::Impl` for the "docs section" (as contrasted with the "code block") to avoid indenting it. To untangle this, I forced the callers of `render_assoc_item` to specify the indentation & the where-clause styling via new parameters. *Moreover*, as alluded to above, only `assoc_method` made the where-clause styling (`Ending`) dependent on the context, not however `assoc_const` or `assoc_ty`! I've fixed that here to avoid making the parameter list of `render_assoc_item` even longer & since it makes them consistent (thereby fixing the remaining issues reported in RUST-112901).
FIXME: Better names & types.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (77d2154): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never rustc-perf Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -0.8%, secondary 1.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 1.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 500.132s -> 501.928s (0.36%) |
TODO: Description.
Addresses #112901 (comment) & thereby fixes #112901.
(No LLM was or will be used by me during the entire creation process of this PR)