about summary refs log tree commit diff
path: root/src/tools/compiletest
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2021-06-10 20:40:52 -0700
committerEric Huss <eric@huss.org>2021-06-20 16:35:14 -0700
commitf2ef8bf776b7fd8aed8654bbad3c2a8b042a89a7 (patch)
tree9584b3a3555eb86da698f5e3749cfe78dace23dc /src/tools/compiletest
parent2817be94cc7f2cf4968b6c49465ac5bf59c02216 (diff)
downloadrust-f2ef8bf776b7fd8aed8654bbad3c2a8b042a89a7.tar.gz
rust-f2ef8bf776b7fd8aed8654bbad3c2a8b042a89a7.zip
compiletest: display the error if rustfix fails
Diffstat (limited to 'src/tools/compiletest')
-rw-r--r--src/tools/compiletest/src/runtest.rs7
1 files 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 @@ impl<'test> TestCx<'test> {
                 },
             )
             .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);