File tree 2 files changed +3
-14
lines changed
src/tools/compiletest/src
2 files changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -1395,14 +1395,6 @@ impl<'test> TestCx<'test> {
1395
1395
matches ! ( self . config. suite. as_str( ) , "rustdoc-ui" | "rustdoc-js" | "rustdoc-json" )
1396
1396
}
1397
1397
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
-
1406
1398
fn make_compile_args (
1407
1399
& self ,
1408
1400
input_file : & Utf8Path ,
@@ -1511,10 +1503,7 @@ impl<'test> TestCx<'test> {
1511
1503
}
1512
1504
1513
1505
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 ( ) ;
1518
1507
let mut dir_opt = "-Zdump-mir-dir=" . to_string ( ) ;
1519
1508
dir_opt. push_str ( mir_dump_dir. as_str ( ) ) ;
1520
1509
debug ! ( "dir_opt: {:?}" , dir_opt) ;
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ impl TestCx<'_> {
56
56
self . diff_mir_files ( from_file. into ( ) , after. into ( ) )
57
57
} else {
58
58
let mut output_file = Utf8PathBuf :: new ( ) ;
59
- output_file. push ( self . get_mir_dump_dir ( ) ) ;
59
+ output_file. push ( self . output_base_dir ( ) ) ;
60
60
output_file. push ( & from_file) ;
61
61
debug ! ( "comparing the contents of: {} with {:?}" , output_file, expected_file) ;
62
62
if !output_file. exists ( ) {
@@ -100,7 +100,7 @@ impl TestCx<'_> {
100
100
101
101
fn diff_mir_files ( & self , before : Utf8PathBuf , after : Utf8PathBuf ) -> String {
102
102
let to_full_path = |path : Utf8PathBuf | {
103
- let full = self . get_mir_dump_dir ( ) . join ( & path) ;
103
+ let full = self . output_base_dir ( ) . join ( & path) ;
104
104
if !full. exists ( ) {
105
105
panic ! (
106
106
"the mir dump file for {} does not exist (requested in {})" ,
You can’t perform that action at this time.
0 commit comments