Skip to content

doctests: fix merging on stable #1

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
wants to merge 1 commit into from
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/librustdoc/doctest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,12 @@ fn run_test(
}

compiler.arg("--edition").arg(doctest.edition.to_string());
if !doctest.is_multiple_tests {
if doctest.is_multiple_tests {
// The merged test harness uses the `test` crate, so we need to actually allow it.
// This will not expose nightly features on stable, because crate attrs disable
// merging, and `#![feature]` is required to be a crate attr.
compiler.env("RUSTC_BOOTSTRAP", "1");
} else {
// Setting these environment variables is unneeded if this is a merged doctest.
compiler.env("UNSTABLE_RUSTDOC_TEST_PATH", &doctest.test_opts.path);
compiler.env(
Expand Down
Loading