Skip to content

Commit ba64ba8

Browse files
committed
Auto merge of #105690 - matthiaskrgr:rollup-khtq97k, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #105642 (Minor grammar nit.) - #105658 (Remove ..X from RELEASES.md) - #105663 (Adjust log line in `fuchsia-test-runner.py`) - #105664 (rustdoc: apply `pre-wrap` CSS to code-wrapped links) - #105665 (rustdoc: simplify popover CSS) - #105676 (rustdoc: add CSS margin between `impl` docblock and its items) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 7bdda8f + b6d140e commit ba64ba8

File tree

7 files changed

+35
-11
lines changed

7 files changed

+35
-11
lines changed

Diff for: RELEASES.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Language
1616
- [Change constant evaluation errors from a deny-by-default lint to a hard error](https://github.com/rust-lang/rust/pull/102091/)
1717
- [Trigger `must_use` on `impl Trait` for supertraits](https://github.com/rust-lang/rust/pull/102287/)
1818
This makes `impl ExactSizeIterator` respect the existing `#[must_use]` annotation on `Iterator`.
19-
- [Allow `..X` and `..=X` in patterns](https://github.com/rust-lang/rust/pull/102275/)
19+
- [Allow `..=X` in patterns](https://github.com/rust-lang/rust/pull/102275/)
2020
- [Uplift `clippy::for_loops_over_fallibles` lint into rustc](https://github.com/rust-lang/rust/pull/99696/)
2121
- [Stabilize `sym` operands in inline assembly](https://github.com/rust-lang/rust/pull/103168/)
2222
- [Update to Unicode 15](https://github.com/rust-lang/rust/pull/101912/)

Diff for: library/core/src/borrow.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
/// to be modified, it can additionally implement [`BorrowMut<T>`].
2727
///
2828
/// Further, when providing implementations for additional traits, it needs
29-
/// to be considered whether they should behave identical to those of the
29+
/// to be considered whether they should behave identically to those of the
3030
/// underlying type as a consequence of acting as a representation of that
3131
/// underlying type. Generic code typically uses `Borrow<T>` when it relies
3232
/// on the identical behavior of these additional trait implementations.

Diff for: src/ci/docker/scripts/fuchsia-test-runner.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ def start(self):
346346
"-f",
347347
self.ssh_keyfile_path(),
348348
"-C",
349-
"Generated by test_toolchain.py",
349+
"Generated by fuchsia-test-runner.py",
350350
],
351351
stdout=self.subprocess_output(),
352352
stderr=self.subprocess_output(),

Diff for: src/librustdoc/html/static/css/rustdoc.css

+6-8
Original file line numberDiff line numberDiff line change
@@ -585,8 +585,8 @@ ul.block, .block li {
585585
text-overflow: ellipsis;
586586
}
587587
/* Wrap non-pre code blocks (`text`) but not (```text```). */
588-
.docblock > :not(pre) > code,
589-
.docblock-short > code {
588+
.docblock :not(pre) > code,
589+
.docblock-short code {
590590
white-space: pre-wrap;
591591
}
592592

@@ -902,10 +902,11 @@ so that we can apply CSS-filters to change the arrow color in themes */
902902
top: 100%;
903903
right: 0;
904904
z-index: 2;
905-
display: block;
906905
margin-top: 7px;
907906
border-radius: 3px;
908907
border: 1px solid var(--border-color);
908+
background-color: var(--main-background-color);
909+
color: var(--main-color);
909910
--popover-arrow-offset: 11px;
910911
}
911912

@@ -916,16 +917,12 @@ so that we can apply CSS-filters to change the arrow color in themes */
916917
right: var(--popover-arrow-offset);
917918
border: solid var(--border-color);
918919
border-width: 1px 1px 0 0;
920+
background-color: var(--main-background-color);
919921
padding: 4px;
920922
transform: rotate(-45deg);
921923
top: -5px;
922924
}
923925

924-
.popover, .popover::before {
925-
background-color: var(--main-background-color);
926-
color: var(--main-color);
927-
}
928-
929926
/* use larger max-width for help popover, but not for help.html */
930927
#help.popover {
931928
max-width: 600px;
@@ -1872,6 +1869,7 @@ in storage.js
18721869
}
18731870

18741871
.variants > .docblock,
1872+
.implementors-toggle > .docblock,
18751873
.impl-items > .rustdoc-toggle[open]:not(:last-child),
18761874
.methods > .rustdoc-toggle[open]:not(:last-child),
18771875
.implementors-toggle[open]:not(:last-child) {

Diff for: src/test/rustdoc-gui/docblock-big-code-mobile.goml

+4
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ show-text: true // We need to enable text draw to be able to have the "real" siz
77
// Little explanations for this test: if the text wasn't displayed on two lines, it would take
88
// around 20px (which is the font size).
99
assert-property: (".docblock p > code", {"offsetHeight": "44"})
10+
11+
// Same check, but where the long code block is also a link
12+
goto: "file://" + |DOC_PATH| + "/test_docs/long_code_block_link/index.html"
13+
assert-property: (".docblock p > a > code", {"offsetHeight": "44"})

Diff for: src/test/rustdoc-gui/impl-doc.goml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// A docblock on an impl must have a margin to separate it from the contents.
2+
goto: "file://" + |DOC_PATH| + "/test_docs/struct.TypeWithImplDoc.html"
3+
4+
// The text is about 24px tall, so if there's a margin, then their position will be >24px apart
5+
compare-elements-position-near-false: (
6+
"#implementations-list > .implementors-toggle > .docblock > p",
7+
"#implementations-list > .implementors-toggle > .impl-items",
8+
{"y": 24}
9+
)

Diff for: src/test/rustdoc-gui/src/test_docs/lib.rs

+13
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ pub mod huge_amount_of_consts {
154154
/// Very long code text `hereIgoWithLongTextBecauseWhyNotAndWhyWouldntI`.
155155
pub mod long_code_block {}
156156

157+
/// Very long code text [`hereIgoWithLongTextBecauseWhyNotAndWhyWouldntI`][lnk].
158+
///
159+
/// [lnk]: crate::long_code_block_link
160+
pub mod long_code_block_link {}
161+
157162
#[macro_export]
158163
macro_rules! repro {
159164
() => {};
@@ -442,3 +447,11 @@ pub mod trait_members {
442447
fn function2() {}
443448
}
444449
}
450+
451+
pub struct TypeWithImplDoc;
452+
453+
/// impl doc
454+
impl TypeWithImplDoc {
455+
/// fn doc
456+
pub fn test_fn() {}
457+
}

0 commit comments

Comments
 (0)