File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
src/tools/compiletest/src Expand file tree Collapse file tree 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> {
12741274 self . fatal_proc_rec ( "process did not return an error status" , proc_res) ;
12751275 }
12761276
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+
12771287 // On Windows, keep all '\' path separators to match the paths reported in the JSON output
12781288 // from the compiler
12791289 let os_file_name = self . testpaths . file . display ( ) . to_string ( ) ;
@@ -1311,13 +1321,7 @@ impl<'test> TestCx<'test> {
13111321
13121322 None => {
13131323 // 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) {
13211325 self . error ( & format ! (
13221326 "{}:{}: unexpected {}: '{}'" ,
13231327 file_name,
You can’t perform that action at this time.
0 commit comments