From 5b41facf4d0c144966d1c355125a686184dc89e9 Mon Sep 17 00:00:00 2001 From: Urgau Date: Sun, 19 Nov 2023 23:17:27 +0100 Subject: [PATCH] Fix cargo-miri not respecting -Zcheck-cfg and lying about it's mode --- src/bootstrap/src/core/build_steps/test.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index 254fbc72a8c7e..a4791aa7d71cc 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -545,6 +545,8 @@ impl Miri { cargo.env("MIRI_SYSROOT", &miri_sysroot); // Debug things. cargo.env("RUST_BACKTRACE", "1"); + // Manually expect the cfg feature. + cargo.rustflag("--check-cfg=cfg(feature,values(any()))"); let mut cargo = Command::from(cargo); let _guard = builder.msg(