diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs index 0e928345d93..fd7540634c8 100644 --- a/src/compiletest/compiletest.rs +++ b/src/compiletest/compiletest.rs @@ -92,7 +92,7 @@ pub fn parse_config(args: Vec ) -> Config { optflag("h", "help", "show this message")); let (argv0, args_) = args.split_first().unwrap(); - if args[1] == "-h" || args[1] == "--help" { + if args.len() == 1 || args[1] == "-h" || args[1] == "--help" { let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0); println!("{}", getopts::usage(&message, &groups)); println!("");