Skip to content

Commit

Permalink
Improve error message in make_tests
Browse files Browse the repository at this point in the history
We should use expect instead of unwrap.

This commit is based on Manishearth/compiletest-rs#58. Thanks to @colin-kiegel.
  • Loading branch information
Munksgaard committed Nov 13, 2019
1 parent 374ad1b commit b03afd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools/compiletest/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit b03afd5

Please sign in to comment.