44mod tests;
55
66pub mod cli;
7- pub mod common;
7+ mod common;
88mod debuggers;
9- pub mod diagnostics;
10- pub mod directives;
11- pub mod edition;
12- pub mod errors;
9+ mod diagnostics;
10+ mod directives;
11+ mod edition;
12+ mod errors;
1313mod executor;
1414mod json;
1515mod output_capture;
1616mod panic_hook;
1717mod raise_fd_limit;
1818mod read2;
19- pub mod runtest;
19+ mod runtest;
2020pub mod rustdoc_gui_test;
21- pub mod util;
21+ mod util;
2222
2323use core:: panic;
2424use std:: collections:: HashSet ;
@@ -50,7 +50,7 @@ use crate::executor::{CollectedTest, ColorConfig};
5050/// The config mostly reflects command-line arguments, but there might also be
5151/// some code here that inspects environment variables or even runs executables
5252/// (e.g. when discovering debugger versions).
53- pub fn parse_config ( args : Vec < String > ) -> Config {
53+ fn parse_config ( args : Vec < String > ) -> Config {
5454 let mut opts = Options :: new ( ) ;
5555 opts. reqopt ( "" , "compile-lib-path" , "path to host shared libraries" , "PATH" )
5656 . reqopt ( "" , "run-lib-path" , "path to target shared libraries" , "PATH" )
@@ -464,7 +464,6 @@ pub fn parse_config(args: Vec<String>) -> Config {
464464 host_linker : matches. opt_str ( "host-linker" ) ,
465465 llvm_components : matches. opt_str ( "llvm-components" ) . unwrap ( ) ,
466466 nodejs : matches. opt_str ( "nodejs" ) ,
467- npm : matches. opt_str ( "npm" ) ,
468467
469468 force_rerun : matches. opt_present ( "force-rerun" ) ,
470469
@@ -488,22 +487,15 @@ pub fn parse_config(args: Vec<String>) -> Config {
488487 }
489488}
490489
491- pub fn opt_str ( maybestr : & Option < String > ) -> & str {
492- match * maybestr {
493- None => "(none)" ,
494- Some ( ref s) => s,
495- }
496- }
497-
498- pub fn opt_str2 ( maybestr : Option < String > ) -> String {
490+ fn opt_str2 ( maybestr : Option < String > ) -> String {
499491 match maybestr {
500492 None => "(none)" . to_owned ( ) ,
501493 Some ( s) => s,
502494 }
503495}
504496
505497/// Called by `main` after the config has been parsed.
506- pub fn run_tests ( config : Arc < Config > ) {
498+ fn run_tests ( config : Arc < Config > ) {
507499 debug ! ( ?config, "run_tests" ) ;
508500
509501 panic_hook:: install_panic_hook ( ) ;
@@ -641,7 +633,7 @@ impl TestCollector {
641633/// FIXME(Zalathar): Now that we no longer rely on libtest, try to overhaul
642634/// test discovery to take into account the filters/tests specified on the
643635/// command-line, instead of having to enumerate everything.
644- pub ( crate ) fn collect_and_make_tests ( config : Arc < Config > ) -> Vec < CollectedTest > {
636+ fn collect_and_make_tests ( config : Arc < Config > ) -> Vec < CollectedTest > {
645637 debug ! ( "making tests from {}" , config. src_test_suite_root) ;
646638 let common_inputs_stamp = common_inputs_stamp ( & config) ;
647639 let modified_tests =
@@ -853,7 +845,7 @@ fn collect_tests_from_dir(
853845}
854846
855847/// Returns true if `file_name` looks like a proper test file name.
856- pub fn is_test ( file_name : & str ) -> bool {
848+ fn is_test ( file_name : & str ) -> bool {
857849 if !file_name. ends_with ( ".rs" ) {
858850 return false ;
859851 }
@@ -1133,7 +1125,7 @@ fn check_for_overlapping_test_paths(found_path_stems: &HashSet<Utf8PathBuf>) {
11331125 }
11341126}
11351127
1136- pub fn early_config_check ( config : & Config ) {
1128+ fn early_config_check ( config : & Config ) {
11371129 if !config. has_html_tidy && config. mode == TestMode :: Rustdoc {
11381130 warning ! ( "`tidy` (html-tidy.org) is not installed; diffs will not be generated" ) ;
11391131 }
0 commit comments