Skip to content

Commit ee2bec0

Browse files
authored
Rollup merge of #130567 - jieyouxu:tool-docs-compiletest, r=Kobzol
Register tool docs for compiletest This PR registers tool docs for `src/tools/compiletest`, meaning that ``` $ ./x doc src/tools/compiletest ``` or ``` $ ./x doc compiletest ``` will now generate docs, like for `run-make-support`. Fixes #130564.
2 parents b963750 + 08453d5 commit ee2bec0

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

src/bootstrap/src/core/build_steps/doc.rs

+7
Original file line numberDiff line numberDiff line change
@@ -1058,6 +1058,13 @@ tool_doc!(
10581058
is_library = true,
10591059
crates = ["run_make_support"]
10601060
);
1061+
tool_doc!(
1062+
Compiletest,
1063+
"src/tools/compiletest",
1064+
rustc_tool = false,
1065+
is_library = true,
1066+
crates = ["compiletest"]
1067+
);
10611068

10621069
#[derive(Ord, PartialOrd, Debug, Clone, Hash, PartialEq, Eq)]
10631070
pub struct ErrorIndex {

src/bootstrap/src/core/builder.rs

+1
Original file line numberDiff line numberDiff line change
@@ -945,6 +945,7 @@ impl<'a> Builder<'a> {
945945
doc::Releases,
946946
doc::RunMakeSupport,
947947
doc::BuildHelper,
948+
doc::Compiletest,
948949
),
949950
Kind::Dist => describe!(
950951
dist::Docs,

src/tools/compiletest/src/header.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ pub struct TestProps {
125125
// Build documentation for all specified aux-builds as well
126126
pub build_aux_docs: bool,
127127
/// Build the documentation for each crate in a unique output directory.
128-
/// Uses <root output directory>/docs/<test name>/doc
128+
/// Uses `<root output directory>/docs/<test name>/doc`.
129129
pub unique_doc_out_dir: bool,
130130
// Flag to force a crate to be built with the host architecture
131131
pub force_host: bool,
@@ -1304,12 +1304,12 @@ pub fn llvm_has_libzstd(config: &Config) -> bool {
13041304
false
13051305
}
13061306

1307-
/// Takes a directive of the form "<version1> [- <version2>]",
1308-
/// returns the numeric representation of <version1> and <version2> as
1309-
/// tuple: (<version1> as u32, <version2> as u32)
1307+
/// Takes a directive of the form `"<version1> [- <version2>]"`,
1308+
/// returns the numeric representation of `<version1>` and `<version2>` as
1309+
/// tuple: `(<version1> as u32, <version2> as u32)`.
13101310
///
1311-
/// If the <version2> part is omitted, the second component of the tuple
1312-
/// is the same as <version1>.
1311+
/// If the `<version2>` part is omitted, the second component of the tuple
1312+
/// is the same as `<version1>`.
13131313
fn extract_version_range<F>(line: &str, parse: F) -> Option<(u32, u32)>
13141314
where
13151315
F: Fn(&str) -> Option<u32>,

0 commit comments

Comments
 (0)