Rollup merge of #66363 - Munksgaard:patch-1, r=dtolnay

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.
This commit is contained in:
Yuki Okushi 2019-11-14 14:16:25 +09:00 committed by GitHub
commit 2d453b3907
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}