diff options
| author | bors <bors@rust-lang.org> | 2022-10-16 04:54:29 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-10-16 04:54:29 +0000 |
| commit | e928a4656f729a4df2cdc6874abf2bf06e47cef9 (patch) | |
| tree | f3b444adbf09d3c4132d4011f26d9dc0a2859a69 /src | |
| parent | 75dbd5b8c3e3e3e7673caa890422e654d39b815e (diff) | |
| parent | 66a2bba309409bd4c437428c2a4c5dc87f55f784 (diff) | |
| download | rust-e928a4656f729a4df2cdc6874abf2bf06e47cef9.tar.gz rust-e928a4656f729a4df2cdc6874abf2bf06e47cef9.zip | |
Auto merge of #103105 - JohnTitor:rollup-x4ivrix, r=JohnTitor
Rollup of 6 pull requests Successful merges: - #101717 (Add documentation about the memory layout of `UnsafeCell<T>`) - #102023 (Add MaybeUninit array transpose From impls) - #103033 (Update pkg-config) - #103080 (pretty: fix to print some lifetimes on HIR pretty-print) - #103082 (Surround type with backticks) - #103088 (Fix settings page) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/html/static/js/settings.js | 4 | ||||
| -rw-r--r-- | src/test/pretty/issue-85089.pp | 20 | ||||
| -rw-r--r-- | src/test/pretty/issue-85089.rs | 16 | ||||
| -rw-r--r-- | src/test/rustdoc-gui/settings.goml | 11 |
4 files changed, 48 insertions, 3 deletions
diff --git a/src/librustdoc/html/static/js/settings.js b/src/librustdoc/html/static/js/settings.js index 1c5d33e2127..5e1c7e6f03e 100644 --- a/src/librustdoc/html/static/js/settings.js +++ b/src/librustdoc/html/static/js/settings.js @@ -216,7 +216,9 @@ const innerHTML = `<div class="settings">${buildSettingsPageSections(settings)}</div>`; const el = document.createElement(elementKind); el.id = "settings"; - el.className = "popover"; + if (!isSettingsPage) { + el.className = "popover"; + } el.innerHTML = innerHTML; if (isSettingsPage) { diff --git a/src/test/pretty/issue-85089.pp b/src/test/pretty/issue-85089.pp new file mode 100644 index 00000000000..f84e9df04a2 --- /dev/null +++ b/src/test/pretty/issue-85089.pp @@ -0,0 +1,20 @@ +#[prelude_import] +use ::std::prelude::rust_2015::*; +#[macro_use] +extern crate std; +// Test to print lifetimes on HIR pretty-printing. + +// pretty-compare-only +// pretty-mode:hir +// pp-exact:issue-85089.pp + +trait A<'x> { } +trait B<'x> { } + +struct Foo<'b> { + bar: &'b dyn for<'a> A<'a>, +} + +impl <'a> B<'a> for dyn for<'b> A<'b> { } + +impl <'a> A<'a> for Foo<'a> { } diff --git a/src/test/pretty/issue-85089.rs b/src/test/pretty/issue-85089.rs new file mode 100644 index 00000000000..eb45d473119 --- /dev/null +++ b/src/test/pretty/issue-85089.rs @@ -0,0 +1,16 @@ +// Test to print lifetimes on HIR pretty-printing. + +// pretty-compare-only +// pretty-mode:hir +// pp-exact:issue-85089.pp + +trait A<'x> {} +trait B<'x> {} + +struct Foo<'b> { + pub bar: &'b dyn for<'a> A<'a>, +} + +impl<'a> B<'a> for dyn for<'b> A<'b> {} + +impl<'a> A<'a> for Foo<'a> {} diff --git a/src/test/rustdoc-gui/settings.goml b/src/test/rustdoc-gui/settings.goml index dfbf1d38e0e..ed4e9c2516b 100644 --- a/src/test/rustdoc-gui/settings.goml +++ b/src/test/rustdoc-gui/settings.goml @@ -1,4 +1,5 @@ -// This test ensures that the settings menu display is working as expected. +// This test ensures that the settings menu display is working as expected and that +// the settings page is also rendered as expected. goto: "file://" + |DOC_PATH| + "/test_docs/index.html" show-text: true // needed when we check for colors below. // First, we check that the settings page doesn't exist. @@ -140,7 +141,13 @@ assert-css: ("#settings-menu .popover", {"display": "none"}) // Now we go to the settings page to check that the CSS is loaded as expected. goto: "file://" + |DOC_PATH| + "/settings.html" wait-for: "#settings" -assert-css: (".setting-line .toggle .slider", {"width": "45px", "margin-right": "20px"}) +assert-css: ( + ".setting-line .toggle .slider", + {"width": "45px", "margin-right": "20px", "border": "0px none rgb(0, 0, 0)"}, +) + +assert-attribute-false: ("#settings", {"class": "popover"}, CONTAINS) +compare-elements-position: (".sub-container", "#settings", ("x")) // We now check the display with JS disabled. assert-false: "noscript section" |
