Skip to content

Commit ebf0c35

Browse files
committed
Revert "get nightly version from env var to pin exact version"
This reverts commit a7b9a1c.
1 parent 23860a9 commit ebf0c35

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

contrib/tools/config-docs-generator/src/extract_docs.rs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -157,18 +157,10 @@ fn generate_rustdoc_json(package: &str) -> Result<serde_json::Value> {
157157

158158
// WARNING: This tool relies on nightly rustdoc JSON output (-Z unstable-options --output-format json)
159159
// The JSON format is subject to change with new Rust nightly versions and could break this tool.
160-
// Determine the toolchain to use for rustdoc. Allow callers to override the
161-
// default "+nightly" prefix via the `RUST_NIGHTLY_VERSION` environment variable
162-
// so CI can pin a specific nightly (e.g. "+nightly-2025-06-17").
163-
let toolchain_arg =
164-
std::env::var("RUST_NIGHTLY_VERSION").unwrap_or_else(|_| "nightly".to_string());
165-
166-
let toolchain_arg = format!("+{}", toolchain_arg);
167-
168-
// Use cargo rustdoc with the selected toolchain to generate JSON for the main package
160+
// Use cargo rustdoc with nightly to generate JSON for the main package
169161
let output = StdCommand::new("cargo")
170162
.args([
171-
toolchain_arg.as_str(),
163+
"+nightly",
172164
"rustdoc",
173165
"--lib",
174166
"-p",
@@ -198,7 +190,7 @@ fn generate_rustdoc_json(package: &str) -> Result<serde_json::Value> {
198190
);
199191
let output = StdCommand::new("cargo")
200192
.args([
201-
toolchain_arg.as_str(),
193+
"+nightly",
202194
"rustdoc",
203195
"--lib",
204196
"-p",

0 commit comments

Comments
 (0)