diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index f3a0e87d43a..ed120ee877a 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -3938,10 +3938,15 @@ impl<'test> TestCx<'test> { self.props.compare_output_lines_by_subset, ); } else if !expected_fixed.is_empty() { - panic!( - "the `// run-rustfix` directive wasn't found but a `*.fixed` \ - file was found" - ); + if self.config.suite == "ui" { + panic!( + "the `//@ run-rustfix` directive wasn't found but a `*.fixed` file was found" + ); + } else { + panic!( + "the `// run-rustfix` directive wasn't found but a `*.fixed` file was found" + ); + } } if errors > 0 {