File tree 1 file changed +11
-7
lines changed
src/tools/compiletest/src
1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -1274,6 +1274,16 @@ impl<'test> TestCx<'test> {
1274
1274
self . fatal_proc_rec ( "process did not return an error status" , proc_res) ;
1275
1275
}
1276
1276
1277
+ if self . props . known_bug {
1278
+ if !expected_errors. is_empty ( ) {
1279
+ self . fatal_proc_rec (
1280
+ "`known_bug` tests should not have an expected errors" ,
1281
+ proc_res,
1282
+ ) ;
1283
+ }
1284
+ return ;
1285
+ }
1286
+
1277
1287
// On Windows, keep all '\' path separators to match the paths reported in the JSON output
1278
1288
// from the compiler
1279
1289
let os_file_name = self . testpaths . file . display ( ) . to_string ( ) ;
@@ -1311,13 +1321,7 @@ impl<'test> TestCx<'test> {
1311
1321
1312
1322
None => {
1313
1323
// If the test is a known bug, don't require that the error is annotated
1314
- if !self . props . known_bug
1315
- && self . is_unexpected_compiler_message (
1316
- actual_error,
1317
- expect_help,
1318
- expect_note,
1319
- )
1320
- {
1324
+ if self . is_unexpected_compiler_message ( actual_error, expect_help, expect_note) {
1321
1325
self . error ( & format ! (
1322
1326
"{}:{}: unexpected {}: '{}'" ,
1323
1327
file_name,
You can’t perform that action at this time.
0 commit comments