-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 9 pull requests #102377
Rollup of 9 pull requests #102377
Conversation
When this CSS was added in 34bd2b8, source links were nested below headers. https://github.com/rust-lang/rust/blob/34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9/src/librustdoc/html/render.rs#L4015-L4019 Now, thanks to 458e721, they are now siblings of headers, and thanks to 270d09d, they have the same font size that they would've had anyway.
LLVM 15 added `Optional::has_value`, and LLVM `main` (16) has deprecated `hasValue`. However, its `explicit operator bool` does the same thing, and was added long ago, so we can use that across our full LLVM range of compatibility.
In rust-lang#101230, the internal diagnostic migration lints - `diagnostic_outside_of_impl` and `untranslatable_diagnostic` - were modified so that they wouldn't trigger on functions annotated with `#[rustc_lint_diagnostics]`. However, this change has to make it into the bootstrap compiler before the `#[allow]` annotations that it aims to remove can be removed, which is possible now that rust-lang#102051 has landed. Signed-off-by: David Wood <david.wood@huawei.com>
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Containment This affected layout a little and required adjustments to the CSS to keep spacing the same. In particular, the margins of adjacent items usually overlap with each other. However, when an item has contain: layout, any margins of child nodes push out the size of the item itself. This was making spacing between items a little too big. To solve that, I removed margins in some places: in particular for certain classes that often occur at the end of a `details.rustdoc-toggle` block, I removed their bottom margin. Generally, the margins provided by the next item down are sufficient. Also remove an unnecessary margin-top on .code-header.
Co-authored-by: Michael Howell <michael@notriddle.com>
When the separate top and bottom styles were added in cd3f4da, some of the CSS rules were needlessly duplicated. The `text-align: initial` rule on `.side-by-side` was always redundant, since the rules that centered the text were set on children, not parents.
…s, r=joshtriplett Stabilize `#![feature(mixed_integer_ops)]` Tracked and FCP completed in rust-lang#87840. ````@rustbot```` label +T-libs-api +S-waiting-on-review +relnotes r? rust-lang/t-libs-api
rustdoc: use CSS containment to speed up render https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Containment This affected layout a little and required adjustments to the CSS to keep spacing the same. In particular, the margins of adjacent items usually overlap with each other. However, when an item has contain: layout, any margins of child nodes push out the size of the item itself. This was making spacing between items a little too big. To solve that, I removed margins in some places: in particular for certain classes that often occur at the end of a `details.rustdoc-toggle` block, I removed their bottom margin. Generally, the margins provided by the next item down are sufficient. Also remove an unnecessary margin-top on .code-header. In particular this helps with the problem that rustdoc in some situations can generate giant HTML pages, which can crash a Chrome tab on typical modern hardware, for instance: `https://docs.rs/iced-x86/1.16.0/iced_x86/code_asm/struct.CodeAssembler.html` (26MB, 409k DOM nodes). This doesn't, of course, universally solve the problem, but it pushes out the boundary of the largest page rustdoc can produce without crashing a browser tab. Demos: https://rustdoc.crud.net/jsha/css-contain/std/string/struct.String.html (warning: giant page, _may_ crash a browser tab) https://rustdoc.crud.net/jsha/css-contain-icedx86/iced_x86/code_asm/struct.CodeAssembler.html r? `@notriddle`
make invalid_value lint a bit smarter around enums Fixes rust-lang#102043
…w-ptr, r=davidtwco Structured suggestion for missing `mut`/`const` in raw pointer Fixes rust-lang#102261
…llaumeGomez rustdoc: remove no-op CSS `.srclink { font-weight; font-size }` When this CSS was added in 34bd2b8, source links were nested below headers. https://github.com/rust-lang/rust/blob/34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9/src/librustdoc/html/render.rs#L4015-L4019 Now, thanks to 458e721, they are now siblings of headers, and thanks to 270d09d, they have the same font size that they would've had anyway.
Avoid LLVM-deprecated `Optional::hasValue` LLVM 15 added `Optional::has_value`, and LLVM `main` (16) has deprecated `hasValue`. However, its `explicit operator bool` does the same thing, and was added long ago, so we can use that across our full LLVM range of compatibility.
…mp-allow-lint, r=lcnr session: remove now-unnecessary lint `#[allow]`s In rust-lang#101230, the internal diagnostic migration lints - `diagnostic_outside_of_impl` and `untranslatable_diagnostic` - were modified so that they wouldn't trigger on functions annotated with `#[rustc_lint_diagnostics]`. However, this change has to make it into the bootstrap compiler before the `#[allow]` annotations that it aims to remove can be removed, which is possible now that rust-lang#102051 has landed.
…n, r=GuillaumeGomez rustdoc: remove redundant `#help-button` CSS When the separate top and bottom styles were added in cd3f4da, some of the CSS rules were needlessly duplicated. The `text-align: initial` rule on `.side-by-side` was always redundant, since the rules that centered the text were set on children, not parents.
…otriddle Fix search result colors Fixes regression introduced in rust-lang@99c0071. As you can see, ayu lost some colors for its search results: beta/nightly: ![Screenshot from 2022-09-27 19-46-49](https://user-images.githubusercontent.com/3050060/192606456-e7bb58dd-cf76-49a0-b1ae-28565adb1dc6.png) stable: ![Screenshot from 2022-09-27 19-46-36](https://user-images.githubusercontent.com/3050060/192606453-e720e219-a336-4ff1-989b-2fdb76e789eb.png) We'll need to backport it to beta too to prevent it reaching stable. r? `@notriddle`
@bors r+ rollup=never p=9 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR: previous master: 470e518c4b In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (90c34fa): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis 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.
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.
Footnotes |
Successful merges:
#![feature(mixed_integer_ops)]
#101555 (Stabilize#![feature(mixed_integer_ops)]
)mut
/const
in raw pointer #102284 (Structured suggestion for missingmut
/const
in raw pointer).srclink { font-weight; font-size }
#102330 (rustdoc: remove no-op CSS.srclink { font-weight; font-size }
)Optional::hasValue
#102337 (Avoid LLVM-deprecatedOptional::hasValue
)#[allow]
s #102356 (session: remove now-unnecessary lint#[allow]
s)#help-button
CSS #102367 (rustdoc: remove redundant#help-button
CSS)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup