Skip to content

Commit 8a487ab

Browse files
committed
Make the empty rustc-wrapper test more explicit.
1 parent ba5b192 commit 8a487ab

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tests/testsuite/check.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,18 @@ fn check_keep_going() {
870870

871871
#[cargo_test]
872872
fn does_not_use_empty_rustc_wrapper() {
873-
let p = project().file("src/lib.rs", "").build();
873+
// An empty RUSTC_WRAPPER environment variable won't be used.
874+
// The env var will also override the config, essentially unsetting it.
875+
let p = project()
876+
.file("src/lib.rs", "")
877+
.file(
878+
".cargo/config.toml",
879+
r#"
880+
[build]
881+
rustc-wrapper = "do-not-execute-me"
882+
"#,
883+
)
884+
.build();
874885
p.cargo("check").env("RUSTC_WRAPPER", "").run();
875886
}
876887

0 commit comments

Comments
 (0)