Skip to content

Commit 0f8029f

Browse files
committed
Use a different env var for the test directory
1 parent 4a57e79 commit 0f8029f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,8 @@ fn make_temp_file(file_name: &'static str) -> TempFile {
866866
use std::env::var;
867867
use std::fs::File;
868868

869-
let target_dir = var("CARGO_TARGET_DIR").unwrap_or_else(|_| ".".to_owned());
869+
// Used in the Rust build system.
870+
let target_dir = var("RUSTFMT_TEST_DIR").unwrap_or_else(|_| ".".to_owned());
870871
let path = Path::new(&target_dir).join(file_name);
871872

872873
let mut file = File::create(&path).expect("Couldn't create temp file");

0 commit comments

Comments
 (0)