From b20e267cc52d495a7617c57006644730d1ba60dc Mon Sep 17 00:00:00 2001 From: Michael Baikov Date: Fri, 29 Mar 2024 23:00:54 -0400 Subject: [PATCH] compiletest: print reason for failing to read tests --- src/tools/compiletest/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tools/compiletest/src/lib.rs b/src/tools/compiletest/src/lib.rs index b791b38379f..1624e2a6084 100644 --- a/src/tools/compiletest/src/lib.rs +++ b/src/tools/compiletest/src/lib.rs @@ -571,7 +571,9 @@ pub fn make_tests( &modified_tests, &mut poisoned, ) - .unwrap_or_else(|_| panic!("Could not read tests from {}", config.src_base.display())); + .unwrap_or_else(|reason| { + panic!("Could not read tests from {}: {reason}", config.src_base.display()) + }); if poisoned { eprintln!();