Skip to content

Commit f2ef8bf

Browse files
committed
compiletest: display the error if rustfix fails
1 parent 2817be9 commit f2ef8bf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/tools/compiletest/src/runtest.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -3328,8 +3328,11 @@ impl<'test> TestCx<'test> {
33283328
},
33293329
)
33303330
.unwrap();
3331-
let fixed_code = apply_suggestions(&unfixed_code, &suggestions).unwrap_or_else(|_| {
3332-
panic!("failed to apply suggestions for {:?} with rustfix", self.testpaths.file)
3331+
let fixed_code = apply_suggestions(&unfixed_code, &suggestions).unwrap_or_else(|e| {
3332+
panic!(
3333+
"failed to apply suggestions for {:?} with rustfix: {}",
3334+
self.testpaths.file, e
3335+
)
33333336
});
33343337

33353338
errors += self.compare_output("fixed", &fixed_code, &expected_fixed);

0 commit comments

Comments
 (0)