diff options
| author | Philip Munksgaard <pmunksgaard@gmail.com> | 2019-11-13 12:44:43 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-13 12:44:43 +0100 |
| commit | b03afd5fc46f9e80932af9f68cf4dc7a1c9c1f2c (patch) | |
| tree | 7f631727f9174ee0120b20da1dd74e48679e027d | |
| parent | 374ad1b0063963060a00a3110e44d76e7105d059 (diff) | |
| download | rust-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.rs | 2 |
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 } |
