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!();