Skip to content

Miri gives warning: "warning: flag -Z doctest-xcompile has been stabilized in the 1.89 release, and is no longer necessary" #4328

@theemathas

Description

@theemathas

With a mostly empty cargo project:

fn main() {}
[package]
name = "foo"
edition = "2024"

I ran cargo +nightly miri run, and I got the following output:

warning: flag `-Z doctest-xcompile` has been stabilized in the 1.89 release, and is no longer necessary
  Doctest cross-compiling is now always enabled.

   Compiling foo v0.0.0 (/Users/timch/foo)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.10s
     Running `/Users/timch/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/cargo-miri runner target/miri/aarch64-apple-darwin/debug/foo`

The warning seems like a bug to me.

This is also reproducible when running on miri on the playground.

Rust versions:
$ rustc +nightly --version --verbose
rustc 1.89.0-nightly (777d37277 2025-05-17)
binary: rustc
commit-hash: 777d372772aa3b39ba7273fcb8208a89f2ab0afd
commit-date: 2025-05-17
host: aarch64-apple-darwin
release: 1.89.0-nightly
LLVM version: 20.1.4

$ cargo +nightly --version --verbose
cargo 1.89.0-nightly (47c911e9e 2025-05-14)
release: 1.89.0-nightly
commit-hash: 47c911e9e6f6461f90ce19142031fe16876a3b95
commit-date: 2025-05-14
host: aarch64-apple-darwin
libgit2: 1.9.0 (sys:0.20.0 vendored)
libcurl: 8.7.1 (sys:0.4.80+curl-8.12.1 system ssl:(SecureTransport) LibreSSL/3.3.6)
ssl: OpenSSL 3.4.1 11 Feb 2025
os: Mac OS 15.4.1 [64-bit]

Note the mismatch between the dates of the rustc and cargo release dates. However, rustup update seems to indicate that my rust installation is already up-to-date.

Activity

RalfJung

RalfJung commented on May 18, 2025

@RalfJung
Member

Yeah, I've seen this on our CI as well. We still haven't fully recovered from rust-lang/cargo#15462. A fix is in this repo and a sync is in progress -- but since it's just a warning, I won't push for landing that as fast as possible.

added 2 commits that reference this issue on May 18, 2025
edc61d8
cf3b1b1
added a commit that references this issue on May 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @RalfJung@theemathas

      Issue actions

        Miri gives warning: "warning: flag `-Z doctest-xcompile` has been stabilized in the 1.89 release, and is no longer necessary" · Issue #4328 · rust-lang/miri