about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPhilip Munksgaard <pmunksgaard@gmail.com>2019-11-13 12:44:43 +0100
committerGitHub <noreply@github.com>2019-11-13 12:44:43 +0100
commitb03afd5fc46f9e80932af9f68cf4dc7a1c9c1f2c (patch)
tree7f631727f9174ee0120b20da1dd74e48679e027d
parent374ad1b0063963060a00a3110e44d76e7105d059 (diff)
downloadrust-b03afd5fc46f9e80932af9f68cf4dc7a1c9c1f2c.tar.gz
rust-b03afd5fc46f9e80932af9f68cf4dc7a1c9c1f2c.zip
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.
-rw-r--r--src/tools/compiletest/src/main.rs2
1 files changed, 1 insertions, 1 deletions
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<test::TestDescAndFn> {
         &config.src_base,
         &PathBuf::new(),
         &mut tests,
-    ).unwrap();
+    ).expect(&format!("Could not read tests from {}", config.src_base.display()));
     tests
 }