From f377ac5e665911877ea9d94708fc2357e08eab9c Mon Sep 17 00:00:00 2001 From: Jacob Hoffman-Andrews Date: Sun, 21 Nov 2021 21:09:23 -0800 Subject: [PATCH 1/4] rustdoc-gui/tester: print full filename on error This makes it easier to find the test that needs fixing. --- src/tools/rustdoc-gui/tester.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tools/rustdoc-gui/tester.js b/src/tools/rustdoc-gui/tester.js index b598c63f52a..0d6a2605d4f 100644 --- a/src/tools/rustdoc-gui/tester.js +++ b/src/tools/rustdoc-gui/tester.js @@ -194,7 +194,7 @@ async function main(argv) { .then(out => { const [output, nb_failures] = out; results[nb_failures === 0 ? "successful" : "failed"].push({ - file_name: file_name, + file_name: testPath, output: output, }); if (nb_failures > 0) { @@ -206,7 +206,7 @@ async function main(argv) { }) .catch(err => { results.errored.push({ - file_name: file_name, + file_name: testPath + file_name, output: err, }); status_bar.erroneous(); @@ -239,7 +239,7 @@ async function main(argv) { console.log(""); results.failed.sort(by_filename); results.failed.forEach(r => { - console.log(r.output); + console.log(r.file_name, r.output); }); } if (results.errored.length > 0) { @@ -247,7 +247,7 @@ async function main(argv) { // print run errors on the bottom so developers see them better results.errored.sort(by_filename); results.errored.forEach(r => { - console.error(r.output); + console.error(r.file_name, r.output); }); } From a56559df1346c44aa058f3a82785f20230a0468f Mon Sep 17 00:00:00 2001 From: Jacob Hoffman-Andrews Date: Sun, 21 Nov 2021 21:10:12 -0800 Subject: [PATCH 2/4] Set color for in a more straightforward way Previously, we set the default color for tags to black, and then had an override with a bunch of not() clauses to set anchors in docblocks to blue. Instead, we should set the default color for to blue (or equivalent in other themes), and override it for places like the sidebar or search results, where we don't want them to be styled as links. --- src/librustdoc/html/static/css/rustdoc.css | 4 --- src/librustdoc/html/static/css/themes/ayu.css | 17 ++++++++----- .../html/static/css/themes/dark.css | 25 +++++++++++-------- .../html/static/css/themes/light.css | 25 +++++++++++-------- src/test/rustdoc-gui/anchors.goml | 17 +++++++++++++ 5 files changed, 58 insertions(+), 30 deletions(-) create mode 100644 src/test/rustdoc-gui/anchors.goml diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 89a763ef6d7..f4d6b39eedf 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -1079,10 +1079,6 @@ a.test-arrow:hover{ text-decoration: none; } -.section-header a { - color: inherit; -} - .code-attribute { font-weight: 300; } diff --git a/src/librustdoc/html/static/css/themes/ayu.css b/src/librustdoc/html/static/css/themes/ayu.css index ba7fb3b5456..a808dbd9ef1 100644 --- a/src/librustdoc/html/static/css/themes/ayu.css +++ b/src/librustdoc/html/static/css/themes/ayu.css @@ -214,18 +214,23 @@ nav.main .separator { border: 1px solid #5c6773; } a { + color: #39AFD7; +} +a.srclink, +a#toggle-all-docs, +#source-sidebar a, +pre.rust a, +.sidebar a, +.in-band a { color: #c5c5c5; } +.search-results a { + color: #0096cf; +} body.source .example-wrap pre.rust a { background: #333; } -.docblock:not(.item-decl) a:not(.srclink):not(.test-arrow), -.docblock-short a:not(.srclink):not(.test-arrow), .item-info a, -#help a { - color: #39AFD7; -} - details.rustdoc-toggle > summary.hideme > span, details.rustdoc-toggle > summary::before, details.undocumented > summary::before { diff --git a/src/librustdoc/html/static/css/themes/dark.css b/src/librustdoc/html/static/css/themes/dark.css index 77ac217e6f4..f0ac129b997 100644 --- a/src/librustdoc/html/static/css/themes/dark.css +++ b/src/librustdoc/html/static/css/themes/dark.css @@ -174,23 +174,28 @@ nav.main .current { nav.main .separator { border-color: #eee; } + a { + color: #D2991D; +} +a.srclink, +a#toggle-all-docs, +#source-sidebar a, +pre.rust a, +.sidebar a, +.in-band a { color: #ddd; } +.search-results a { + color: #ddd; +} +a.test-arrow { + color: #dedede; +} body.source .example-wrap pre.rust a { background: #333; } -.docblock:not(.item-decl) a:not(.srclink):not(.test-arrow), -.docblock-short a:not(.srclink):not(.test-arrow), .item-info a, -#help a { - color: #D2991D; -} - -a.test-arrow { - color: #dedede; -} - details.rustdoc-toggle > summary.hideme > span, details.rustdoc-toggle > summary::before, details.undocumented > summary::before { diff --git a/src/librustdoc/html/static/css/themes/light.css b/src/librustdoc/html/static/css/themes/light.css index 6df137e3914..05f12fc365d 100644 --- a/src/librustdoc/html/static/css/themes/light.css +++ b/src/librustdoc/html/static/css/themes/light.css @@ -169,23 +169,28 @@ nav.main .current { nav.main .separator { border: 1px solid #000; } + a { + color: #3873AD; +} +a.srclink, +a#toggle-all-docs, +#source-sidebar a, +pre.rust a, +.sidebar a, +.in-band a { color: #000; } +.search-results a { + color: initial; +} +a.test-arrow { + color: #f5f5f5; +} body.source .example-wrap pre.rust a { background: #eee; } -.docblock:not(.item-decl) a:not(.srclink):not(.test-arrow), -.docblock-short a:not(.srclink):not(.test-arrow), .item-info a, -#help a { - color: #3873AD; -} - -a.test-arrow { - color: #f5f5f5; -} - details.rustdoc-toggle > summary.hideme > span, details.rustdoc-toggle > summary::before, details.undocumented > summary::before { diff --git a/src/test/rustdoc-gui/anchors.goml b/src/test/rustdoc-gui/anchors.goml new file mode 100644 index 00000000000..6953009604c --- /dev/null +++ b/src/test/rustdoc-gui/anchors.goml @@ -0,0 +1,17 @@ +goto: file://|DOC_PATH|/test_docs/struct.HeavilyDocumentedStruct.html + +// Set the theme to light. +local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"} +// We reload the page so the local storage settings are being used. +reload: + +assert-css: ("#toggle-all-docs", {"color": "rgba(0, 0, 0, 0)"}) +assert-css: (".fqn .in-band a:nth-of-type(1)", {"color": "rgba(0, 0, 0, 0)"}) +assert-css: (".fqn .in-band a:nth-of-type(2)", {"color": "rgba(0, 0, 0, 0)"}) +assert-css: (".srclink", {"color": "rgba(0, 0, 0, 0)"}) +assert-css: (".srclink", {"color": "rgba(0, 0, 0, 0)"}) + +assert-css: ("#top-doc-prose-title", {"color": "rgba(0, 0, 0, 0)"}) + +assert-css: (".sidebar a", {"color": "rgba(0, 0, 0, 0)"}) +assert-css: (".in-band a", {"color": "rgba(0, 0, 0, 0)"}) From a85c608eb3596c02b9b7421e98b6ab54c7fbadbd Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Mon, 22 Nov 2021 13:39:44 -0800 Subject: [PATCH 3/4] Update books --- src/doc/book | 2 +- src/doc/edition-guide | 2 +- src/doc/embedded-book | 2 +- src/doc/reference | 2 +- src/doc/rust-by-example | 2 +- src/doc/rustc-dev-guide | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/doc/book b/src/doc/book index 5c5dbc5b196..a5e0c5b2c5f 160000 --- a/src/doc/book +++ b/src/doc/book @@ -1 +1 @@ -Subproject commit 5c5dbc5b196c9564422b3193264f3288d2a051ce +Subproject commit a5e0c5b2c5f9054be3b961aea2c7edfeea591de8 diff --git a/src/doc/edition-guide b/src/doc/edition-guide index 27f4a84d385..8e0ec8c77d8 160000 --- a/src/doc/edition-guide +++ b/src/doc/edition-guide @@ -1 +1 @@ -Subproject commit 27f4a84d3852e9416cae5861254fa53a825c56bd +Subproject commit 8e0ec8c77d8b28b86159fdee9d33a758225ecf9c diff --git a/src/doc/embedded-book b/src/doc/embedded-book index 51739471276..8c395bdd807 160000 --- a/src/doc/embedded-book +++ b/src/doc/embedded-book @@ -1 +1 @@ -Subproject commit 51739471276b1776dea27cf562b974ef07e24685 +Subproject commit 8c395bdd8073deb20ca67e1ed4b14a3a7e315a37 diff --git a/src/doc/reference b/src/doc/reference index a01d151a725..c0f222da235 160000 --- a/src/doc/reference +++ b/src/doc/reference @@ -1 +1 @@ -Subproject commit a01d151a7250a540a9cb7ccce5956f020c677c21 +Subproject commit c0f222da23568477155991d391c9ce918e381351 diff --git a/src/doc/rust-by-example b/src/doc/rust-by-example index e9d45342d7a..43f82530210 160000 --- a/src/doc/rust-by-example +++ b/src/doc/rust-by-example @@ -1 +1 @@ -Subproject commit e9d45342d7a6c1def4731f1782d87ea317ba30c3 +Subproject commit 43f82530210b83cf888282b207ed13d5893da9b2 diff --git a/src/doc/rustc-dev-guide b/src/doc/rustc-dev-guide index 196ef69aa68..a2fc9635029 160000 --- a/src/doc/rustc-dev-guide +++ b/src/doc/rustc-dev-guide @@ -1 +1 @@ -Subproject commit 196ef69aa68f2cef44f37566ee7db37daf00301b +Subproject commit a2fc9635029c04e692474965a6606f8e286d539a From b086bd0412195c66ff25cab549800a7a1bb5148c Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Mon, 22 Nov 2021 14:01:57 -0800 Subject: [PATCH 4/4] Update cargo --- Cargo.lock | 8 ++++---- src/tools/cargo | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 28b922cf913..51ed441d0db 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -888,9 +888,9 @@ dependencies = [ [[package]] name = "curl" -version = "0.4.40" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877cc2f9b8367e32b6dabb9d581557e651cb3aa693a37f8679091bbf42687d5d" +checksum = "1bc6d233563261f8db6ffb83bbaad5a73837a6e6b28868e926337ebbdece0be3" dependencies = [ "curl-sys", "libc", @@ -903,9 +903,9 @@ dependencies = [ [[package]] name = "curl-sys" -version = "0.4.50+curl-7.79.1" +version = "0.4.51+curl-7.80.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4856b76919dd599f31236bb18db5f5bd36e2ce131e64f857ca5c259665b76171" +checksum = "d130987e6a6a34fe0889e1083022fa48cd90e6709a84be3fb8dd95801de5af20" dependencies = [ "cc", "libc", diff --git a/src/tools/cargo b/src/tools/cargo index ad50d0d2662..e1fb17631eb 160000 --- a/src/tools/cargo +++ b/src/tools/cargo @@ -1 +1 @@ -Subproject commit ad50d0d266213e0cc4f6e526a39d96faae9a3842 +Subproject commit e1fb17631eb1b3665cdbe45b1c186111577ef512