From b03afd5fc46f9e80932af9f68cf4dc7a1c9c1f2c Mon Sep 17 00:00:00 2001 From: Philip Munksgaard Date: Wed, 13 Nov 2019 12:44:43 +0100 Subject: [PATCH] Improve error message in make_tests We should use expect instead of unwrap. This commit is based on https://github.com/laumann/compiletest-rs/pull/58. Thanks to @colin-kiegel. --- src/tools/compiletest/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs index b115539b4af..9bf427953a1 100644 --- a/src/tools/compiletest/src/main.rs +++ b/src/tools/compiletest/src/main.rs @@ -581,7 +581,7 @@ pub fn make_tests(config: &Config) -> Vec { &config.src_base, &PathBuf::new(), &mut tests, - ).unwrap(); + ).expect(&format!("Could not read tests from {}", config.src_base.display())); tests }