Skip to content

Commit 9b067df

Browse files
authored
Rollup merge of rust-lang#123224 - pacak:better-error-message, r=compiler-errors
compiletest: print reason for failing to read tests Turns this ``` Could not read tests from /path/to/rust/tests/run-make note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Build completed unsuccessfully in 0:00:05 ``` into this: ``` Could not read tests from /path/to/rust/tests/run-make: run-make tests cannot have both `Makefile` and `rmake.rs` note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Build completed unsuccessfully in 0:00:05 ``` While first one is technically correct - it's not helpful at all, adding backtrace is not making it any better.
2 parents 558880a + b20e267 commit 9b067df

File tree

1 file changed

+3
-1
lines changed
  • src/tools/compiletest/src

1 file changed

+3
-1
lines changed

Diff for: src/tools/compiletest/src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,9 @@ pub fn make_tests(
571571
&modified_tests,
572572
&mut poisoned,
573573
)
574-
.unwrap_or_else(|_| panic!("Could not read tests from {}", config.src_base.display()));
574+
.unwrap_or_else(|reason| {
575+
panic!("Could not read tests from {}: {reason}", config.src_base.display())
576+
});
575577

576578
if poisoned {
577579
eprintln!();

0 commit comments

Comments
 (0)