Skip to content

cargo miri test is broken for doctests (Option 'sysroot' given more than once) #3404

Closed
rust-lang/rust
#123030
@RalfJung

Description

@RalfJung

rust-lang/rust#122840 changed the way rustdoc passes arguments to rustc for doctest builds, which causes cargo miri test to break. The first symptom is output like

---- src/lib.rs - my_fn (line 37) stdout ----
error: Option 'sysroot' given more than once

Couldn't compile the test.

The deeper cause is that Miri does a lot of scanning and patching of rustc command-line arguments, and if those arguments are hidden in a file then everything breaks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions