Skip to content

Commit 6288739

Browse files
committed
don't use force-unstable-if-unmarked with x test in standard library doctests.
Using `force-unstable-if-unmarked makes` bootstrap process ignoring errors, potentially leading to the merging of PRs that do not compile successfully. Signed-off-by: ozkanonur <[email protected]>
1 parent 18be272 commit 6288739

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/bootstrap/bin/rustdoc.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,14 @@ fn main() {
5252
// Force all crates compiled by this compiler to (a) be unstable and (b)
5353
// allow the `rustc_private` feature to link to other unstable crates
5454
// also in the sysroot.
55-
if env::var_os("RUSTC_FORCE_UNSTABLE").is_some() {
55+
if env::var_os("RUSTC_FORCE_UNSTABLE").is_some()
56+
// We don't want to enable this flag on std as this makes bootstrap ignoring the doctests
57+
// errors.
58+
&& env::var_os("__CARGO_DEFAULT_LIB_METADATA") != Some(OsString::from("devstd"))
59+
{
5660
cmd.arg("-Z").arg("force-unstable-if-unmarked");
5761
}
62+
5863
if let Some(linker) = env::var_os("RUSTDOC_LINKER") {
5964
let mut arg = OsString::from("-Clinker=");
6065
arg.push(&linker);

0 commit comments

Comments
 (0)