From f2ef8bf776b7fd8aed8654bbad3c2a8b042a89a7 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Thu, 10 Jun 2021 20:40:52 -0700 Subject: [PATCH] compiletest: display the error if rustfix fails --- src/tools/compiletest/src/runtest.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 02dffaab7b6..6a1faee1d8e 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -3328,8 +3328,11 @@ fn run_ui_test(&self) { }, ) .unwrap(); - let fixed_code = apply_suggestions(&unfixed_code, &suggestions).unwrap_or_else(|_| { - panic!("failed to apply suggestions for {:?} with rustfix", self.testpaths.file) + let fixed_code = apply_suggestions(&unfixed_code, &suggestions).unwrap_or_else(|e| { + panic!( + "failed to apply suggestions for {:?} with rustfix: {}", + self.testpaths.file, e + ) }); errors += self.compare_output("fixed", &fixed_code, &expected_fixed);