Skip to content

Commit e4e660e

Browse files
authored
Rollup merge of rust-lang#124245 - workingjubilee:bootstrap-some-doc-comments, r=onur-ozkan
bootstrap: Promote some build_steps comments to docs No new content, just makes some comments readable when viewing the docs with `--document-private-items`.
2 parents 3cd56f3 + 9470e05 commit e4e660e

File tree

8 files changed

+28
-28
lines changed

8 files changed

+28
-28
lines changed

src/bootstrap/src/core/build_steps/check.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ macro_rules! tool_check_step {
394394
impl Step for $name {
395395
type Output = ();
396396
const ONLY_HOSTS: bool = true;
397-
// don't ever check out-of-tree tools by default, they'll fail when toolstate is broken
397+
/// don't ever check out-of-tree tools by default, they'll fail when toolstate is broken
398398
const DEFAULT: bool = matches!($source_type, SourceType::InTree) $( && $default )?;
399399

400400
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {

src/bootstrap/src/core/build_steps/clippy.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use super::compile::std_cargo;
2424
use super::tool::prepare_tool_cargo;
2525
use super::tool::SourceType;
2626

27-
// Disable the most spammy clippy lints
27+
/// Disable the most spammy clippy lints
2828
const IGNORED_RULES_FOR_STD_AND_RUSTC: &[&str] = &[
2929
"many_single_char_names", // there are a lot in stdarch
3030
"collapsible_if",

src/bootstrap/src/core/build_steps/compile.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -835,13 +835,13 @@ impl Rustc {
835835
}
836836

837837
impl Step for Rustc {
838-
// We return the stage of the "actual" compiler (not the uplifted one).
839-
//
840-
// By "actual" we refer to the uplifting logic where we may not compile the requested stage;
841-
// instead, we uplift it from the previous stages. Which can lead to bootstrap failures in
842-
// specific situations where we request stage X from other steps. However we may end up
843-
// uplifting it from stage Y, causing the other stage to fail when attempting to link with
844-
// stage X which was never actually built.
838+
/// We return the stage of the "actual" compiler (not the uplifted one).
839+
///
840+
/// By "actual" we refer to the uplifting logic where we may not compile the requested stage;
841+
/// instead, we uplift it from the previous stages. Which can lead to bootstrap failures in
842+
/// specific situations where we request stage X from other steps. However we may end up
843+
/// uplifting it from stage Y, causing the other stage to fail when attempting to link with
844+
/// stage X which was never actually built.
845845
type Output = u32;
846846
const ONLY_HOSTS: bool = true;
847847
const DEFAULT: bool = false;
@@ -1302,7 +1302,7 @@ fn is_codegen_cfg_needed(path: &TaskPath, run: &RunConfig<'_>) -> bool {
13021302
impl Step for CodegenBackend {
13031303
type Output = ();
13041304
const ONLY_HOSTS: bool = true;
1305-
// Only the backends specified in the `codegen-backends` entry of `config.toml` are built.
1305+
/// Only the backends specified in the `codegen-backends` entry of `config.toml` are built.
13061306
const DEFAULT: bool = true;
13071307

13081308
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {

src/bootstrap/src/core/build_steps/dist.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -2272,9 +2272,9 @@ impl Step for LlvmBitcodeLinker {
22722272
}
22732273
}
22742274

2275-
// Tarball intended for internal consumption to ease rustc/std development.
2276-
//
2277-
// Should not be considered stable by end users.
2275+
/// Tarball intended for internal consumption to ease rustc/std development.
2276+
///
2277+
/// Should not be considered stable by end users.
22782278
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
22792279
pub struct RustDev {
22802280
pub target: TargetSelection,
@@ -2356,9 +2356,9 @@ impl Step for RustDev {
23562356
}
23572357
}
23582358

2359-
// Tarball intended for internal consumption to ease rustc/std development.
2360-
//
2361-
// Should not be considered stable by end users.
2359+
/// Tarball intended for internal consumption to ease rustc/std development.
2360+
///
2361+
/// Should not be considered stable by end users.
23622362
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
23632363
pub struct Bootstrap {
23642364
pub target: TargetSelection,

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ impl Step for SharedAssets {
506506
run.never()
507507
}
508508

509-
// Generate shared resources used by other pieces of documentation.
509+
/// Generate shared resources used by other pieces of documentation.
510510
fn run(self, builder: &Builder<'_>) -> Self::Output {
511511
let out = builder.doc_out(self.target);
512512

src/bootstrap/src/core/build_steps/install.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ const SHELL: &str = "bash";
2020
#[cfg(not(target_os = "illumos"))]
2121
const SHELL: &str = "sh";
2222

23-
// We have to run a few shell scripts, which choke quite a bit on both `\`
24-
// characters and on `C:\` paths, so normalize both of them away.
23+
/// We have to run a few shell scripts, which choke quite a bit on both `\`
24+
/// characters and on `C:\` paths, so normalize both of them away.
2525
fn sanitize_sh(path: &Path) -> String {
2626
let path = path.to_str().unwrap().replace('\\', "/");
2727
return change_drive(unc_to_lfs(&path)).unwrap_or(path);

src/bootstrap/src/core/build_steps/llvm.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ impl LlvmBuildStatus {
5656
}
5757
}
5858

59-
// Linker flags to pass to LLVM's CMake invocation.
59+
/// Linker flags to pass to LLVM's CMake invocation.
6060
#[derive(Debug, Clone, Default)]
6161
struct LdFlags {
62-
// CMAKE_EXE_LINKER_FLAGS
62+
/// CMAKE_EXE_LINKER_FLAGS
6363
exe: OsString,
64-
// CMAKE_SHARED_LINKER_FLAGS
64+
/// CMAKE_SHARED_LINKER_FLAGS
6565
shared: OsString,
66-
// CMAKE_MODULE_LINKER_FLAGS
66+
/// CMAKE_MODULE_LINKER_FLAGS
6767
module: OsString,
6868
}
6969

src/bootstrap/src/core/build_steps/test.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1433,8 +1433,8 @@ host_test!(RustdocJson { path: "tests/rustdoc-json", mode: "rustdoc-json", suite
14331433

14341434
host_test!(Pretty { path: "tests/pretty", mode: "pretty", suite: "pretty" });
14351435

1436-
// Special-handling is needed for `run-make`, so don't use `default_test` for defining `RunMake`
1437-
// tests.
1436+
/// Special-handling is needed for `run-make`, so don't use `default_test` for defining `RunMake`
1437+
/// tests.
14381438
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
14391439
pub struct RunMake {
14401440
pub compiler: Compiler,
@@ -1527,10 +1527,10 @@ impl Coverage {
15271527

15281528
impl Step for Coverage {
15291529
type Output = ();
1530-
// We rely on the individual CoverageMap/CoverageRun steps to run themselves.
1530+
/// We rely on the individual CoverageMap/CoverageRun steps to run themselves.
15311531
const DEFAULT: bool = false;
1532-
// When manually invoked, try to run as much as possible.
1533-
// Compiletest will automatically skip the "coverage-run" tests if necessary.
1532+
/// When manually invoked, try to run as much as possible.
1533+
/// Compiletest will automatically skip the "coverage-run" tests if necessary.
15341534
const ONLY_HOSTS: bool = false;
15351535

15361536
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {

0 commit comments

Comments
 (0)