Update panic message for missing //@ run-rustfix ui test suite when a .fixed file exists

This commit is contained in:
许杰友 Jieyou Xu (Joe) 2024-02-20 11:33:29 +00:00
parent 5af2130440
commit ad14a226c0
No known key found for this signature in database
GPG Key ID: 95DDEBD74A1DC2C0

View File

@ -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 {