Skip to content

don't use force-unstable-if-unmarked with x test in standard library doctests #115186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/bootstrap/bin/rustdoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,14 @@ fn main() {
// Force all crates compiled by this compiler to (a) be unstable and (b)
// allow the `rustc_private` feature to link to other unstable crates
// also in the sysroot.
if env::var_os("RUSTC_FORCE_UNSTABLE").is_some() {
if env::var_os("RUSTC_FORCE_UNSTABLE").is_some()
// We don't want to enable this flag on std as this makes bootstrap ignoring the doctests
// errors.
&& env::var_os("__CARGO_DEFAULT_LIB_METADATA") != Some(OsString::from("devstd"))
{
cmd.arg("-Z").arg("force-unstable-if-unmarked");
}

if let Some(linker) = env::var_os("RUSTDOC_LINKER") {
let mut arg = OsString::from("-Clinker=");
arg.push(&linker);
Expand Down