@@ -869,7 +869,7 @@ struct HeaderLine<'ln> {
869
869
870
870
fn iter_header (
871
871
mode : Mode ,
872
- suite : & str ,
872
+ _suite : & str ,
873
873
poisoned : & mut bool ,
874
874
testfile : & Path ,
875
875
rdr : impl Read ,
@@ -900,11 +900,7 @@ fn iter_header(
900
900
}
901
901
}
902
902
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 { "#" } ;
908
904
909
905
let mut rdr = BufReader :: with_capacity ( 1024 , rdr) ;
910
906
let mut ln = String :: new ( ) ;
@@ -931,7 +927,7 @@ fn iter_header(
931
927
// First try to accept `ui_test` style comments
932
928
} else if let Some ( ( header_revision, directive) ) = line_directive ( comment, ln) {
933
929
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) {
935
931
let Some ( ( _, rest) ) = line_directive ( "//" , ln) else {
936
932
continue ;
937
933
} ;
@@ -951,7 +947,7 @@ fn iter_header(
951
947
// directive. We emit an error here to warn the user.
952
948
* poisoned = true ;
953
949
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:{:#?}" ,
955
951
testfile. display( ) ,
956
952
line_number,
957
953
line_directive( "//" , ln) ,
@@ -964,7 +960,7 @@ fn iter_header(
964
960
// directive. We emit an error here to warn the user.
965
961
* poisoned = true ;
966
962
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:{:#?}" ,
968
964
testfile. display( ) ,
969
965
line_number,
970
966
line_directive( "//" , ln) ,
@@ -1265,11 +1261,8 @@ pub fn make_test_description<R: Read>(
1265
1261
1266
1262
if let Some ( ( _, post) ) = original_line. trim_start ( ) . split_once ( "//" ) {
1267
1263
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.
1273
1266
} else {
1274
1267
decision ! ( cfg:: handle_ignore( config, ln) ) ;
1275
1268
}
0 commit comments