From 1a3c5c40ca1499217fc72917738fd39219bbff17 Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Sun, 26 Nov 2023 15:01:42 +0000 Subject: [PATCH 1/4] rustdoc: Remove space from fake-variadic fn ptr impls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit before: `for fn (T₁, T₂, …, Tₙ) -> Ret` after: `for fn(T₁, T₂, …, Tₙ) -> Ret` --- library/core/src/primitive_docs.rs | 2 +- src/librustdoc/html/format.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/core/src/primitive_docs.rs b/library/core/src/primitive_docs.rs index a7e20407cece4..e5d7e964381c5 100644 --- a/library/core/src/primitive_docs.rs +++ b/library/core/src/primitive_docs.rs @@ -1629,7 +1629,7 @@ mod prim_ref {} /// /// ### Trait implementations /// -/// In this documentation the shorthand `fn (T₁, T₂, …, Tₙ)` is used to represent non-variadic +/// In this documentation the shorthand `fn(T₁, T₂, …, Tₙ)` is used to represent non-variadic /// function pointers of varying length. Note that this is a convenience notation to avoid /// repetitive documentation, not valid Rust syntax. /// diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs index 06bfd4652d6a5..bed8f6ffef5a9 100644 --- a/src/librustdoc/html/format.rs +++ b/src/librustdoc/html/format.rs @@ -1305,7 +1305,7 @@ impl clean::Impl { primitive_link_fragment( f, PrimitiveType::Tuple, - format_args!("fn ({name}₁, {name}₂, …, {name}ₙ{ellipsis})"), + format_args!("fn({name}₁, {name}₂, …, {name}ₙ{ellipsis})"), "#trait-implementations-1", cx, )?; From 1a86482c5727a40b348dae02b9ef136c5cfcb3f5 Mon Sep 17 00:00:00 2001 From: onur-ozkan Date: Sun, 26 Nov 2023 17:59:20 +0300 Subject: [PATCH 2/4] skip {tidy,compiletest,rustdoc-gui} based tests for `DocTests::Only` As use of `--doc` with `x test` is intended for running doc-tests only, executing compiletest, tidy or rustdoc-gui based tests considered as an incorrect behavior from bootstrap. This change fixes that. Signed-off-by: onur-ozkan --- src/bootstrap/src/core/build_steps/test.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index ec859d30c82a3..cf52270efac17 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -999,6 +999,7 @@ impl Step for RustdocGUI { let run = run.suite_path("tests/rustdoc-gui"); run.lazy_default_condition(Box::new(move || { builder.config.nodejs.is_some() + && builder.doc_tests != DocTests::Only && builder .config .npm @@ -1158,7 +1159,8 @@ HELP: to skip test's attempt to check tidiness, pass `--skip src/tools/tidy` to } fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { - run.path("src/tools/tidy") + let default = run.builder.doc_tests != DocTests::Only; + run.path("src/tools/tidy").default_condition(default) } fn make_run(run: RunConfig<'_>) { @@ -1560,6 +1562,10 @@ impl Step for Compiletest { /// compiletest `mode` and `suite` arguments. For example `mode` can be /// "run-pass" or `suite` can be something like `debuginfo`. fn run(self, builder: &Builder<'_>) { + if builder.doc_tests == DocTests::Only { + return; + } + if builder.top_stage == 0 && env::var("COMPILETEST_FORCE_STAGE0").is_err() { eprintln!("\ ERROR: `--stage 0` runs compiletest on the beta compiler, not your local changes, and will almost always cause tests to fail @@ -2323,6 +2329,8 @@ impl Step for CrateLibrustc { } fn run(self, builder: &Builder<'_>) { + builder.ensure(compile::Std::new(self.compiler, self.target)); + builder.ensure(Crate { compiler: self.compiler, target: self.target, From 4d9344d26ebe8ac6ede26ca054a57334be4299ad Mon Sep 17 00:00:00 2001 From: clubby789 Date: Sun, 26 Nov 2023 16:22:43 +0000 Subject: [PATCH 3/4] Fix Rustdoc search docs link --- src/librustdoc/html/static/js/main.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/librustdoc/html/static/js/main.js b/src/librustdoc/html/static/js/main.js index 615fb08c76f38..afc735e3990a2 100644 --- a/src/librustdoc/html/static/js/main.js +++ b/src/librustdoc/html/static/js/main.js @@ -1328,8 +1328,7 @@ function preLoadCss(cssUrl) { const infos = [ `For a full list of all search features, take a look here.`, +href="https://doc.rust-lang.org/${channel}/rustdoc/read-documentation/search.html">here.`, "Prefix searches with a type followed by a colon (e.g., fn:) to \ restrict the search to a given item kind.", "Accepted kinds are: fn, mod, struct, \ From 41a97888c7637e4879385778439ff1b52fb27f3e Mon Sep 17 00:00:00 2001 From: Waffle Maybe Date: Sun, 26 Nov 2023 18:39:38 +0100 Subject: [PATCH 4/4] Add my work email to the mailmap --- .mailmap | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.mailmap b/.mailmap index b6f4112392db7..d70a9f2aed684 100644 --- a/.mailmap +++ b/.mailmap @@ -575,7 +575,8 @@ Val Markovic Valerii Lashmanov Vitali Haravy Vitali Haravy Vitaly Shukela -Waffle Maybe +Waffle Lapkin +Waffle Lapkin Wesley Wiser whitequark William Ting