From b3e1e4194e510d99d5aae25689c3c1e5f1998b15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E6=9D=B0=E5=8F=8B=20Jieyou=20Xu=20=28Joe=29?= Date: Thu, 19 Sep 2024 16:38:02 +0000 Subject: [PATCH 1/2] Register tool docs for compiletest --- src/bootstrap/src/core/build_steps/doc.rs | 7 +++++++ src/bootstrap/src/core/builder.rs | 1 + 2 files changed, 8 insertions(+) diff --git a/src/bootstrap/src/core/build_steps/doc.rs b/src/bootstrap/src/core/build_steps/doc.rs index 3755f4a33cba1..979671cfa9d31 100644 --- a/src/bootstrap/src/core/build_steps/doc.rs +++ b/src/bootstrap/src/core/build_steps/doc.rs @@ -1058,6 +1058,13 @@ tool_doc!( is_library = true, crates = ["run_make_support"] ); +tool_doc!( + Compiletest, + "src/tools/compiletest", + rustc_tool = false, + is_library = true, + crates = ["compiletest"] +); #[derive(Ord, PartialOrd, Debug, Clone, Hash, PartialEq, Eq)] pub struct ErrorIndex { diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs index 003b11ec7cff4..2124890b94f67 100644 --- a/src/bootstrap/src/core/builder.rs +++ b/src/bootstrap/src/core/builder.rs @@ -945,6 +945,7 @@ impl<'a> Builder<'a> { doc::Releases, doc::RunMakeSupport, doc::BuildHelper, + doc::Compiletest, ), Kind::Dist => describe!( dist::Docs, From 08453d5ac224a99873fd83d042efbd61aedd5f72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E6=9D=B0=E5=8F=8B=20Jieyou=20Xu=20=28Joe=29?= Date: Thu, 19 Sep 2024 16:40:26 +0000 Subject: [PATCH 2/2] Fix compiletest doc comments --- src/tools/compiletest/src/header.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index 933913eb47c34..93df6aa72550f 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -125,7 +125,7 @@ pub struct TestProps { // Build documentation for all specified aux-builds as well pub build_aux_docs: bool, /// Build the documentation for each crate in a unique output directory. - /// Uses /docs//doc + /// Uses `/docs//doc`. pub unique_doc_out_dir: bool, // Flag to force a crate to be built with the host architecture pub force_host: bool, @@ -1304,12 +1304,12 @@ pub fn llvm_has_libzstd(config: &Config) -> bool { false } -/// Takes a directive of the form " [- ]", -/// returns the numeric representation of and as -/// tuple: ( as u32, as u32) +/// Takes a directive of the form `" [- ]"`, +/// returns the numeric representation of `` and `` as +/// tuple: `( as u32, as u32)`. /// -/// If the part is omitted, the second component of the tuple -/// is the same as . +/// If the `` part is omitted, the second component of the tuple +/// is the same as ``. fn extract_version_range(line: &str, parse: F) -> Option<(u32, u32)> where F: Fn(&str) -> Option,