diff options
| author | Eric Huss <eric@huss.org> | 2021-06-10 20:40:52 -0700 |
|---|---|---|
| committer | Eric Huss <eric@huss.org> | 2021-06-20 16:35:14 -0700 |
| commit | f2ef8bf776b7fd8aed8654bbad3c2a8b042a89a7 (patch) | |
| tree | 9584b3a3555eb86da698f5e3749cfe78dace23dc /src/tools/compiletest | |
| parent | 2817be94cc7f2cf4968b6c49465ac5bf59c02216 (diff) | |
| download | rust-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.rs | 7 |
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); |
