@@ -869,7 +869,7 @@ struct HeaderLine<'ln> {
869869
870870fn iter_header (
871871 mode : Mode ,
872- suite : & str ,
872+ _suite : & str ,
873873 poisoned : & mut bool ,
874874 testfile : & Path ,
875875 rdr : impl Read ,
@@ -900,11 +900,7 @@ fn iter_header(
900900 }
901901 }
902902
903- let comment = if testfile. extension ( ) . is_some_and ( |e| e == "rs" ) {
904- if mode == Mode :: Ui && suite == "ui" { "//@" } else { "//" }
905- } else {
906- "#"
907- } ;
903+ let comment = if testfile. extension ( ) . is_some_and ( |e| e == "rs" ) { "//@" } else { "#" } ;
908904
909905 let mut rdr = BufReader :: with_capacity ( 1024 , rdr) ;
910906 let mut ln = String :: new ( ) ;
@@ -931,7 +927,7 @@ fn iter_header(
931927 // First try to accept `ui_test` style comments
932928 } else if let Some ( ( header_revision, directive) ) = line_directive ( comment, ln) {
933929 it ( HeaderLine { line_number, original_line, header_revision, directive } ) ;
934- } else if mode == Mode :: Ui && suite == "ui" && !REVISION_MAGIC_COMMENT_RE . is_match ( ln) {
930+ } else if !REVISION_MAGIC_COMMENT_RE . is_match ( ln) {
935931 let Some ( ( _, rest) ) = line_directive ( "//" , ln) else {
936932 continue ;
937933 } ;
@@ -951,7 +947,7 @@ fn iter_header(
951947 // directive. We emit an error here to warn the user.
952948 * poisoned = true ;
953949 eprintln ! (
954- "error: detected legacy-style directives in ui test: {}:{}, please use `ui_test`-style directives `//@` instead:{:#?}" ,
950+ "error: detected legacy-style directives in compiletest test: {}:{}, please use `ui_test`-style directives `//@` instead:{:#?}" ,
955951 testfile. display( ) ,
956952 line_number,
957953 line_directive( "//" , ln) ,
@@ -964,7 +960,7 @@ fn iter_header(
964960 // directive. We emit an error here to warn the user.
965961 * poisoned = true ;
966962 eprintln ! (
967- "error: detected legacy-style directives in ui test: {}:{}, please use `ui_test`-style directives `//@` instead:{:#?}" ,
963+ "error: detected legacy-style directives in compiletest test: {}:{}, please use `ui_test`-style directives `//@` instead:{:#?}" ,
968964 testfile. display( ) ,
969965 line_number,
970966 line_directive( "//" , ln) ,
@@ -1265,11 +1261,8 @@ pub fn make_test_description<R: Read>(
12651261
12661262 if let Some ( ( _, post) ) = original_line. trim_start ( ) . split_once ( "//" ) {
12671263 let post = post. trim_start ( ) ;
1268- if post. starts_with ( "ignore-tidy" )
1269- && config. mode == Mode :: Ui
1270- && config. suite == "ui"
1271- {
1272- // not handled by compiletest under the ui test mode and ui test suite.
1264+ if post. starts_with ( "ignore-tidy" ) {
1265+ // Not handled by compiletest.
12731266 } else {
12741267 decision ! ( cfg:: handle_ignore( config, ln) ) ;
12751268 }
0 commit comments