@@ -504,7 +504,7 @@ impl TestProps {
504504 & mut self . check_test_line_numbers_match ,
505505 ) ;
506506
507- self . update_pass_mode ( ln, test_revision , config) ;
507+ self . update_pass_mode ( ln, config) ;
508508 self . update_fail_mode ( ln, config) ;
509509
510510 config. set_name_directive ( ln, IGNORE_PASS , & mut self . ignore_pass ) ;
@@ -714,18 +714,15 @@ impl TestProps {
714714 }
715715 }
716716
717- fn update_pass_mode (
718- & mut self ,
719- ln : & DirectiveLine < ' _ > ,
720- revision : Option < & str > ,
721- config : & Config ,
722- ) {
717+ fn update_pass_mode ( & mut self , ln : & DirectiveLine < ' _ > , config : & Config ) {
723718 let check_no_run = |s| match ( config. mode , s) {
724719 ( TestMode :: Ui , _) => ( ) ,
725720 ( TestMode :: Crashes , _) => ( ) ,
726721 ( TestMode :: Codegen , "build-pass" ) => ( ) ,
727722 ( TestMode :: Incremental , _) => {
728- if revision. is_some ( ) && !self . revisions . iter ( ) . all ( |r| r. starts_with ( "cfail" ) ) {
723+ // FIXME(Zalathar): This only detects forbidden directives that are
724+ // declared _after_ the incompatible `//@ revisions:` directive(s).
725+ if self . revisions . iter ( ) . any ( |r| !r. starts_with ( "cfail" ) ) {
729726 panic ! ( "`{s}` directive is only supported in `cfail` incremental tests" )
730727 }
731728 }
0 commit comments