about summary refs log tree commit diff
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com>2024-02-20 11:33:29 +0000
committer许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com>2024-02-20 11:41:44 +0000
commitad14a226c04c4b15a229bb1fba771ba8fd2f5b46 (patch)
treeaf2b39171c305636af021411b3cfa961ad90405a
parent5af2130440c198afefbe5b8099342057cf272ef4 (diff)
downloadrust-ad14a226c04c4b15a229bb1fba771ba8fd2f5b46.tar.gz
rust-ad14a226c04c4b15a229bb1fba771ba8fd2f5b46.zip
Update panic message for missing `//@ run-rustfix` ui test suite when a .fixed file exists
-rw-r--r--src/tools/compiletest/src/runtest.rs13
1 files changed, 9 insertions, 4 deletions
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 {