Skip to content

Commit ad14a22

Browse files
committed
Update panic message for missing //@ run-rustfix ui test suite when a .fixed file exists
1 parent 5af2130 commit ad14a22

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

Diff for: src/tools/compiletest/src/runtest.rs

+9-4
Original file line numberDiff line numberDiff line change
@@ -3938,10 +3938,15 @@ impl<'test> TestCx<'test> {
39383938
self.props.compare_output_lines_by_subset,
39393939
);
39403940
} else if !expected_fixed.is_empty() {
3941-
panic!(
3942-
"the `// run-rustfix` directive wasn't found but a `*.fixed` \
3943-
file was found"
3944-
);
3941+
if self.config.suite == "ui" {
3942+
panic!(
3943+
"the `//@ run-rustfix` directive wasn't found but a `*.fixed` file was found"
3944+
);
3945+
} else {
3946+
panic!(
3947+
"the `// run-rustfix` directive wasn't found but a `*.fixed` file was found"
3948+
);
3949+
}
39453950
}
39463951

39473952
if errors > 0 {

0 commit comments

Comments
 (0)