@@ -571,9 +571,10 @@ actual:\n\
571
571
}
572
572
}
573
573
574
- _=> {
575
- let rust_src_root = self . find_rust_src_root ( )
576
- . expect ( "Could not find Rust source root" ) ;
574
+ _ => {
575
+ let rust_src_root = self . config . find_rust_src_root ( ) . expect (
576
+ "Could not find Rust source root" ,
577
+ ) ;
577
578
let rust_pp_module_rel_path = Path :: new ( "./src/etc" ) ;
578
579
let rust_pp_module_abs_path = rust_src_root. join ( rust_pp_module_rel_path)
579
580
. to_str ( )
@@ -664,19 +665,6 @@ actual:\n\
664
665
self . check_debugger_output ( & debugger_run_result, & check_lines) ;
665
666
}
666
667
667
- fn find_rust_src_root ( & self ) -> Option < PathBuf > {
668
- let mut path = self . config . src_base . clone ( ) ;
669
- let path_postfix = Path :: new ( "src/etc/lldb_batchmode.py" ) ;
670
-
671
- while path. pop ( ) {
672
- if path. join ( & path_postfix) . is_file ( ) {
673
- return Some ( path) ;
674
- }
675
- }
676
-
677
- None
678
- }
679
-
680
668
fn run_debuginfo_lldb_test ( & self ) {
681
669
assert ! ( self . revision. is_none( ) , "revisions not relevant here" ) ;
682
670
@@ -735,7 +723,9 @@ actual:\n\
735
723
script_str. push_str ( "version\n " ) ;
736
724
737
725
// Switch LLDB into "Rust mode"
738
- let rust_src_root = self . find_rust_src_root ( ) . expect ( "Could not find Rust source root" ) ;
726
+ let rust_src_root = self . config . find_rust_src_root ( ) . expect (
727
+ "Could not find Rust source root" ,
728
+ ) ;
739
729
let rust_pp_module_rel_path = Path :: new ( "./src/etc/lldb_rust_formatters.py" ) ;
740
730
let rust_pp_module_abs_path = rust_src_root. join ( rust_pp_module_rel_path)
741
731
. to_str ( )
@@ -1717,11 +1707,13 @@ actual:\n\
1717
1707
if self . props . check_test_line_numbers_match {
1718
1708
self . check_rustdoc_test_option ( proc_res) ;
1719
1709
} else {
1720
- let root = self . find_rust_src_root ( ) . unwrap ( ) ;
1721
- let res = self . cmd2procres ( Command :: new ( & self . config . docck_python )
1722
- . arg ( root. join ( "src/etc/htmldocck.py" ) )
1723
- . arg ( out_dir)
1724
- . arg ( & self . testpaths . file ) ) ;
1710
+ let root = self . config . find_rust_src_root ( ) . unwrap ( ) ;
1711
+ let res = self . cmd2procres (
1712
+ Command :: new ( & self . config . docck_python )
1713
+ . arg ( root. join ( "src/etc/htmldocck.py" ) )
1714
+ . arg ( out_dir)
1715
+ . arg ( & self . testpaths . file ) ,
1716
+ ) ;
1725
1717
if !res. status . success ( ) {
1726
1718
self . fatal_proc_rec ( "htmldocck failed!" , & res) ;
1727
1719
}
0 commit comments