Skip to content

Commit f4c75db

Browse files
committed
Use output dir for mir_dump_dir
1 parent b8005bf commit f4c75db

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/tools/compiletest/src/runtest.rs

+1-12
Original file line numberDiff line numberDiff line change
@@ -1395,14 +1395,6 @@ impl<'test> TestCx<'test> {
13951395
matches!(self.config.suite.as_str(), "rustdoc-ui" | "rustdoc-js" | "rustdoc-json")
13961396
}
13971397

1398-
fn get_mir_dump_dir(&self) -> Utf8PathBuf {
1399-
let mut mir_dump_dir = self.config.build_test_suite_root.clone();
1400-
debug!("input_file: {}", self.testpaths.file);
1401-
mir_dump_dir.push(&self.testpaths.relative_dir);
1402-
mir_dump_dir.push(self.testpaths.file.file_stem().unwrap());
1403-
mir_dump_dir
1404-
}
1405-
14061398
fn make_compile_args(
14071399
&self,
14081400
input_file: &Utf8Path,
@@ -1511,10 +1503,7 @@ impl<'test> TestCx<'test> {
15111503
}
15121504

15131505
let set_mir_dump_dir = |rustc: &mut Command| {
1514-
let mir_dump_dir = self.get_mir_dump_dir();
1515-
remove_and_create_dir_all(&mir_dump_dir).unwrap_or_else(|e| {
1516-
panic!("failed to remove and recreate output directory `{mir_dump_dir}`: {e}")
1517-
});
1506+
let mir_dump_dir = self.output_base_dir();
15181507
let mut dir_opt = "-Zdump-mir-dir=".to_string();
15191508
dir_opt.push_str(mir_dump_dir.as_str());
15201509
debug!("dir_opt: {:?}", dir_opt);

0 commit comments

Comments
 (0)