Skip to content

Commit 066f71e

Browse files
committed
Set RUSTC_BOOTSTRAP for doc runs
This is required for both docs.rs features and the flags passed by docsrs_metadata to cargo.
1 parent 9b5aef2 commit 066f71e

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/runner/test.rs

+5-8
Original file line numberDiff line numberDiff line change
@@ -369,15 +369,12 @@ pub(super) fn test_rustdoc<DB: WriteResults>(
369369
);
370370
assert_eq!(cargo_args[0], "rustdoc");
371371
let cargo_args: Vec<_> = cargo_args.iter().map(|s| s.as_str()).collect();
372+
let mut env = metadata.environment_variables();
373+
// docsrs-metadata requires a nightly environment, but crater sometimes runs tests on beta and
374+
// stable.
375+
env.insert("RUSTC_BOOTSTRAP", "1".to_string());
372376

373-
let res = run_cargo(
374-
ctx,
375-
build_env,
376-
&cargo_args,
377-
true,
378-
local_packages_id,
379-
metadata.environment_variables(),
380-
);
377+
let res = run_cargo(ctx, build_env, &cargo_args, true, local_packages_id, env);
381378

382379
// Make sure to remove the built documentation
383380
// There is no point in storing it after the build is done

0 commit comments

Comments
 (0)