Skip to content

Commit 87e7539

Browse files
committed
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.
1 parent ab68b0f commit 87e7539

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

library/compiler-builtins/compiler-builtins/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ links = "compiler-rt"
1919
bench = false
2020
doctest = false
2121
test = false
22+
# make sure this crate isn't included in public standard library docs
23+
doc = false
2224

2325
[dependencies]
2426
core = { path = "../../core", optional = true }

library/sysroot/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ name = "sysroot"
55
version = "0.0.0"
66
edition = "2024"
77

8+
[lib]
9+
# make sure this crate isn't included in public standard library docs
10+
doc = false
11+
812
# this is a dummy crate to ensure that all required crates appear in the sysroot
913
[dependencies]
1014
proc_macro = { path = "../proc_macro", public = true }

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -739,10 +739,6 @@ fn doc_std(
739739
}
740740

741741
for krate in requested_crates {
742-
if krate == "sysroot" {
743-
// The sysroot crate is an implementation detail, don't include it in public docs.
744-
continue;
745-
}
746742
cargo.arg("-p").arg(krate);
747743
}
748744

0 commit comments

Comments
 (0)