-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Tracking issue for cross-compiling doc tests (doctest-xcompile) #7040
Copy link
Copy link
Closed
Labels
A-doctest-xcompileArea: doctest cross-compilationArea: doctest cross-compilationA-doctestsArea: rustdoc --testArea: rustdoc --testC-tracking-issueCategory: A tracking issue for something unstable.Category: A tracking issue for something unstable.Command-testS-waiting-on-feedbackStatus: An implemented feature is waiting on community feedback for bugs or design concerns.Status: An implemented feature is waiting on community feedback for bugs or design concerns.
Metadata
Metadata
Assignees
Labels
A-doctest-xcompileArea: doctest cross-compilationArea: doctest cross-compilationA-doctestsArea: rustdoc --testArea: rustdoc --testC-tracking-issueCategory: A tracking issue for something unstable.Category: A tracking issue for something unstable.Command-testS-waiting-on-feedbackStatus: An implemented feature is waiting on community feedback for bugs or design concerns.Status: An implemented feature is waiting on community feedback for bugs or design concerns.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Unstable, no backers
Status
Done
Implementation: #6892
Rustc tracking issue: rust-lang/rust#64245
Documentation: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#doctest-xcompile
Issues: https://github.com/rust-lang/cargo/labels/Z-doctest-xcompile
This PR adds the unstable
-Zdoctest-xcompileflag to cargo. When present, instead of skipping doctests whenhost != targetas it does now, cargo parses therunnerfield fortargetfrom.cargo/configand passes that to rustdoc. See here for the companion PR in rust that adds the necessary functionality to rustdoc. The flag also enables a new unstable--enable-per-target-ignoresflag in rustdoc, allowing the use of compiletest-style--ignore-fooannotations for doctests so that they are ignored on a per-target basis. The motivation for these PRs, along with another modifying compiltest and bootstrap (not yet submitted), is to allow bootstrap to utilize the many doctests found in the various crates in the rust compiler, notably libstd and libcore.This should add uniformity and expand testsuites for projects that build for other platforms, since the
runnerfield is already used bycargo test.Unresolved issues