compiletest: display the error if rustfix fails

This commit is contained in:
Eric Huss 2021-06-10 20:40:52 -07:00
parent 2817be94cc
commit f2ef8bf776

View File

@ -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);