diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index 568e86225a3c2..39a9ac8569ad0 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -439,7 +439,7 @@ pub fn parse_opts(args: &[String]) -> Option { let test_threads = match matches.opt_str("test-threads") { Some(n_str) => match n_str.parse::() { - Ok(0) => + Ok(0) => return Some(Err(format!("argument for --test-threads must not be 0"))), Ok(n) => Some(n), Err(e) =>