diff options
| author | Jakub Beránek <berykubik@gmail.com> | 2025-09-05 16:20:53 +0200 |
|---|---|---|
| committer | Jakub Beránek <berykubik@gmail.com> | 2025-09-05 16:20:53 +0200 |
| commit | 9f9473f201e73a74c87ff5532828ad82b42b508e (patch) | |
| tree | 5e9e47e815767135a5c36e87b7990636ff1f1c32 | |
| parent | b5f2a71f55efefcd2560f774b5f157e626630180 (diff) | |
| download | rust-9f9473f201e73a74c87ff5532828ad82b42b508e.tar.gz rust-9f9473f201e73a74c87ff5532828ad82b42b508e.zip | |
Allow `specialization` feature when documenting Cargo
| -rw-r--r-- | src/bootstrap/src/core/build_steps/doc.rs | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/bootstrap/src/core/build_steps/doc.rs b/src/bootstrap/src/core/build_steps/doc.rs index 33a0f617b4a..6aa2b75d5ba 100644 --- a/src/bootstrap/src/core/build_steps/doc.rs +++ b/src/bootstrap/src/core/build_steps/doc.rs @@ -965,9 +965,11 @@ macro_rules! tool_doc { ( $tool: ident, $path: literal, - mode = $mode:expr, - $(is_library = $is_library:expr,)? - $(crates = $crates:expr)? + mode = $mode:expr + $(, is_library = $is_library:expr )? + $(, crates = $crates:expr )? + // Subset of nightly features that are allowed to be used when documenting + $(, allow_features: $allow_features:expr )? ) => { #[derive(Debug, Clone, Hash, PartialEq, Eq)] pub struct $tool { @@ -1041,6 +1043,15 @@ macro_rules! tool_doc { source_type, &[], ); + let allow_features = { + let mut _value = ""; + $( _value = $allow_features; )? + _value + }; + + if allow_features.is_empty() { + cargo.allow_features(allow_features); + } cargo.arg("-Zskip-rustdoc-fingerprint"); // Only include compiler crates, no dependencies of those, such as `libc`. @@ -1134,7 +1145,8 @@ tool_doc!( "crates-io", "mdman", "rustfix", - ] + ], + allow_features: "specialization" ); tool_doc!(Tidy, "src/tools/tidy", mode = Mode::ToolBootstrap, crates = ["tidy"]); tool_doc!( |
