Skip to content

Commit b03afd5

Browse files
authored
Improve error message in make_tests
We should use expect instead of unwrap. This commit is based on Manishearth/compiletest-rs#58. Thanks to @colin-kiegel.
1 parent 374ad1b commit b03afd5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools/compiletest/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ pub fn make_tests(config: &Config) -> Vec<test::TestDescAndFn> {
581581
&config.src_base,
582582
&PathBuf::new(),
583583
&mut tests,
584-
).unwrap();
584+
).expect(&format!("Could not read tests from {}", config.src_base.display()));
585585
tests
586586
}
587587

0 commit comments

Comments
 (0)