Skip to content

Commit 343476d

Browse files
committed
Use CARGO_TARGET_DIR in compile-test
1 parent 048e4d0 commit 343476d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/compile-test.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,8 @@ const RUSTFIX_COVERAGE_KNOWN_EXCEPTIONS: &[&str] = &[
403403
];
404404

405405
fn check_rustfix_coverage() {
406-
let missing_coverage_path = Path::new("target/debug/test/ui/rustfix_missing_coverage.txt");
406+
let target_dir = PathBuf::from(std::env::var("CARGO_TARGET_DIR").unwrap());
407+
let missing_coverage_path = target_dir.join("debug/test/ui/rustfix_missing_coverage.txt");
407408

408409
if let Ok(missing_coverage_contents) = std::fs::read_to_string(missing_coverage_path) {
409410
assert!(RUSTFIX_COVERAGE_KNOWN_EXCEPTIONS.iter().is_sorted_by_key(Path::new));

0 commit comments

Comments
 (0)