diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-07-10 20:28:50 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-10 20:28:50 +0200 |
| commit | 6c4502d97d176bbc5bc14ee25f471abd463b0b1c (patch) | |
| tree | 4509a1e4be8a611e7856b4d1db73cac2a6f652d5 | |
| parent | 92f9480f8dee836eb38e34715e4a3fb3843ccadb (diff) | |
| parent | 87e7539fcdfa45b2aab618c044f888432c5d097d (diff) | |
| download | rust-6c4502d97d176bbc5bc14ee25f471abd463b0b1c.tar.gz rust-6c4502d97d176bbc5bc14ee25f471abd463b0b1c.zip | |
Rollup merge of #143660 - cuviper:lib-doc-false, r=tgross35
Disable docs for `compiler-builtins` and `sysroot` Bootstrap already had a manual doc filter for the `sysroot` crate, but other library crates keep themselves out of the public docs by setting `[lib] doc = false` in their manifest. This seems like a better solution to hide `compiler-builtins` docs, and removes the `sysroot` hack too. Fixes rust-lang/rust#143215 (after backport) ```@rustbot``` label beta-nominated
| -rw-r--r-- | library/compiler-builtins/compiler-builtins/Cargo.toml | 2 | ||||
| -rw-r--r-- | library/sysroot/Cargo.toml | 4 | ||||
| -rw-r--r-- | src/bootstrap/src/core/build_steps/doc.rs | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/library/compiler-builtins/compiler-builtins/Cargo.toml b/library/compiler-builtins/compiler-builtins/Cargo.toml index c5446cd76e3..3ccb05f73fb 100644 --- a/library/compiler-builtins/compiler-builtins/Cargo.toml +++ b/library/compiler-builtins/compiler-builtins/Cargo.toml @@ -19,6 +19,8 @@ links = "compiler-rt" bench = false doctest = false test = false +# make sure this crate isn't included in public standard library docs +doc = false [dependencies] core = { path = "../../core", optional = true } diff --git a/library/sysroot/Cargo.toml b/library/sysroot/Cargo.toml index c4937c36d4c..290c2eeed44 100644 --- a/library/sysroot/Cargo.toml +++ b/library/sysroot/Cargo.toml @@ -5,6 +5,10 @@ name = "sysroot" version = "0.0.0" edition = "2024" +[lib] +# make sure this crate isn't included in public standard library docs +doc = false + # this is a dummy crate to ensure that all required crates appear in the sysroot [dependencies] proc_macro = { path = "../proc_macro", public = true } diff --git a/src/bootstrap/src/core/build_steps/doc.rs b/src/bootstrap/src/core/build_steps/doc.rs index 48dde4aae68..37418f640ac 100644 --- a/src/bootstrap/src/core/build_steps/doc.rs +++ b/src/bootstrap/src/core/build_steps/doc.rs @@ -743,10 +743,6 @@ fn doc_std( } for krate in requested_crates { - if krate == "sysroot" { - // The sysroot crate is an implementation detail, don't include it in public docs. - continue; - } cargo.arg("-p").arg(krate); } |
