From 8a487abedd32d759a1b02e92b563d1c9a903f2ec Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Sun, 24 Jul 2022 13:10:35 -0700 Subject: [PATCH] Make the empty rustc-wrapper test more explicit. --- tests/testsuite/check.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/testsuite/check.rs b/tests/testsuite/check.rs index f54339aa196..4ec3de51ec0 100644 --- a/tests/testsuite/check.rs +++ b/tests/testsuite/check.rs @@ -870,7 +870,18 @@ fn check_keep_going() { #[cargo_test] fn does_not_use_empty_rustc_wrapper() { - let p = project().file("src/lib.rs", "").build(); + // An empty RUSTC_WRAPPER environment variable won't be used. + // The env var will also override the config, essentially unsetting it. + let p = project() + .file("src/lib.rs", "") + .file( + ".cargo/config.toml", + r#" + [build] + rustc-wrapper = "do-not-execute-me" + "#, + ) + .build(); p.cargo("check").env("RUSTC_WRAPPER", "").run(); }