]> git.lizzy.rs Git - rust.git/blobdiff - src/compiletest/compiletest.rs
Auto merge of #29296 - zazdxscf:compiletest_noargs_show_help, r=alexcrichton
[rust.git] / src / compiletest / compiletest.rs
index 0e928345d931f7ff28da2d4a04ba9d7378d18887..dfd99a9beae96cc5ac80615ea61c181f0dd79057 100644 (file)
@@ -13,9 +13,7 @@
 #![feature(box_syntax)]
 #![feature(dynamic_lib)]
 #![feature(libc)]
-#![feature(path_ext)]
 #![feature(rustc_private)]
-#![feature(slice_splits)]
 #![feature(str_char)]
 #![feature(test)]
 #![feature(vec_push_all)]
@@ -92,7 +90,7 @@ pub fn parse_config(args: Vec<String> ) -> 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!("");