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

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
theemathas opened this issue May 18, 2025 · 1 comment · Fixed by rust-lang/rust#141214

Comments

@theemathas
Copy link

theemathas commented May 18, 2025

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.

@RalfJung
Copy link
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.

fmease added a commit to fmease/rust that referenced this issue May 18, 2025
fmease added a commit to fmease/rust that referenced this issue May 18, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this issue May 18, 2025
Rollup merge of rust-lang#141214 - RalfJung:miri-sync, r=RalfJung

Miri subtree update

r? ``@ghost``

Fixes rust-lang/miri#4328
github-actions bot pushed a commit that referenced this issue May 19, 2025
Miri subtree update

r? ``@ghost``

Fixes #4328
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants