Skip to content

Tracking issue for cross-compiling doc tests (doctest-xcompile) #7040

Open

Description

Implementation: #6892
Rustc tracking issue: rust-lang/rust#64245
Documentation: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#doctest-xcompile
Issues: Z-doctest-xcompile Nightly: doctest-xcompile

This PR adds the unstable -Zdoctest-xcompile flag to cargo. When present, instead of skipping doctests when host != target as it does now, cargo parses the runner field for target from .cargo/config and 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-ignores flag in rustdoc, allowing the use of compiletest-style --ignore-foo annotations 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 runner field is already used by cargo test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-doctestsArea: rustdoc --testC-tracking-issueCategory: A tracking issue for something unstable.Command-testS-waiting-on-feedbackStatus: An implemented feature is waiting on community feedback for bugs or design concerns.Z-doctest-xcompileNightly: doctest-xcompile

    Type

    No type

    Projects

    • Status

      Unstable, no backers
    • Status

      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions