Skip to content

Commit

Permalink
Rollup merge of rust-lang#66363 - Munksgaard:patch-1, r=dtolnay
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
JohnTitor authored Nov 14, 2019
2 parents 8d05997 + b03afd5 commit 2d453b3
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 2d453b3

Please sign in to comment.