mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-05 19:58:32 +00:00
Generate docs for bootstrap itself
This verifies the intra-doc links are correct, and hopefully makes things easier for new contributors.
This commit is contained in:
parent
eb9da7bfa3
commit
b084c525d3
@ -264,7 +264,7 @@ impl PathSet {
|
|||||||
|
|
||||||
/// A convenience wrapper for Steps which know they have no aliases and all their sets contain only a single path.
|
/// A convenience wrapper for Steps which know they have no aliases and all their sets contain only a single path.
|
||||||
///
|
///
|
||||||
/// This can be used with [`ShouldRun::krate`], [`ShouldRun::path`], or [`ShouldRun::alias`].
|
/// This can be used with [`ShouldRun::crate_or_deps`], [`ShouldRun::path`], or [`ShouldRun::alias`].
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
pub fn assert_single_path(&self) -> &TaskPath {
|
pub fn assert_single_path(&self) -> &TaskPath {
|
||||||
match self {
|
match self {
|
||||||
@ -787,6 +787,7 @@ impl<'a> Builder<'a> {
|
|||||||
doc::EditionGuide,
|
doc::EditionGuide,
|
||||||
doc::StyleGuide,
|
doc::StyleGuide,
|
||||||
doc::Tidy,
|
doc::Tidy,
|
||||||
|
doc::Bootstrap,
|
||||||
),
|
),
|
||||||
Kind::Dist => describe!(
|
Kind::Dist => describe!(
|
||||||
dist::Docs,
|
dist::Docs,
|
||||||
|
@ -839,6 +839,8 @@ macro_rules! tool_doc {
|
|||||||
)+
|
)+
|
||||||
|
|
||||||
cargo.rustdocflag("--document-private-items");
|
cargo.rustdocflag("--document-private-items");
|
||||||
|
// Since we always pass --document-private-items, there's no need to warn about linking to private items.
|
||||||
|
cargo.rustdocflag("-Arustdoc::private-intra-doc-links");
|
||||||
cargo.rustdocflag("--enable-index-page");
|
cargo.rustdocflag("--enable-index-page");
|
||||||
cargo.rustdocflag("--show-type-layout");
|
cargo.rustdocflag("--show-type-layout");
|
||||||
cargo.rustdocflag("--generate-link-to-definition");
|
cargo.rustdocflag("--generate-link-to-definition");
|
||||||
@ -882,7 +884,8 @@ tool_doc!(
|
|||||||
// "cargo-credential-wincred",
|
// "cargo-credential-wincred",
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
tool_doc!(Tidy, "tidy", "src/tools/tidy", ["tidy"]);
|
tool_doc!(Tidy, "tidy", "src/tools/tidy", rustc_tool = false, ["tidy"]);
|
||||||
|
tool_doc!(Bootstrap, "bootstrap", "src/bootstrap", rustc_tool = false, ["bootstrap"]);
|
||||||
|
|
||||||
#[derive(Ord, PartialOrd, Debug, Copy, Clone, Hash, PartialEq, Eq)]
|
#[derive(Ord, PartialOrd, Debug, Copy, Clone, Hash, PartialEq, Eq)]
|
||||||
pub struct ErrorIndex {
|
pub struct ErrorIndex {
|
||||||
|
@ -123,7 +123,7 @@ impl Config {
|
|||||||
/// This is only required on NixOS and uses the PatchELF utility to
|
/// This is only required on NixOS and uses the PatchELF utility to
|
||||||
/// change the interpreter/RPATH of ELF executables.
|
/// change the interpreter/RPATH of ELF executables.
|
||||||
///
|
///
|
||||||
/// Please see https://nixos.org/patchelf.html for more information
|
/// Please see <https://nixos.org/patchelf.html> for more information
|
||||||
fn fix_bin_or_dylib(&self, fname: &Path) {
|
fn fix_bin_or_dylib(&self, fname: &Path) {
|
||||||
assert_eq!(SHOULD_FIX_BINS_AND_DYLIBS.get(), Some(&true));
|
assert_eq!(SHOULD_FIX_BINS_AND_DYLIBS.get(), Some(&true));
|
||||||
println!("attempting to patch {}", fname.display());
|
println!("attempting to patch {}", fname.display());
|
||||||
|
@ -1011,6 +1011,8 @@ impl Build {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Return a `Group` guard for a [`Step`] that is built for each `--stage`.
|
/// Return a `Group` guard for a [`Step`] that is built for each `--stage`.
|
||||||
|
///
|
||||||
|
/// [`Step`]: crate::builder::Step
|
||||||
fn msg(
|
fn msg(
|
||||||
&self,
|
&self,
|
||||||
action: impl Into<Kind>,
|
action: impl Into<Kind>,
|
||||||
@ -1035,6 +1037,8 @@ impl Build {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Return a `Group` guard for a [`Step`] that is only built once and isn't affected by `--stage`.
|
/// Return a `Group` guard for a [`Step`] that is only built once and isn't affected by `--stage`.
|
||||||
|
///
|
||||||
|
/// [`Step`]: crate::builder::Step
|
||||||
fn msg_unstaged(
|
fn msg_unstaged(
|
||||||
&self,
|
&self,
|
||||||
action: impl Into<Kind>,
|
action: impl Into<Kind>,
|
||||||
|
@ -488,7 +488,7 @@ fn absolute_windows(path: &std::path::Path) -> std::io::Result<std::path::PathBu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Adapted from https://github.com/llvm/llvm-project/blob/782e91224601e461c019e0a4573bbccc6094fbcd/llvm/cmake/modules/HandleLLVMOptions.cmake#L1058-L1079
|
/// Adapted from <https://github.com/llvm/llvm-project/blob/782e91224601e461c019e0a4573bbccc6094fbcd/llvm/cmake/modules/HandleLLVMOptions.cmake#L1058-L1079>
|
||||||
///
|
///
|
||||||
/// When `clang-cl` is used with instrumentation, we need to add clang's runtime library resource
|
/// When `clang-cl` is used with instrumentation, we need to add clang's runtime library resource
|
||||||
/// directory to the linker flags, otherwise there will be linker errors about the profiler runtime
|
/// directory to the linker flags, otherwise there will be linker errors about the profiler runtime
|
||||||
|
Loading…
Reference in New Issue
Block a user