@@ -59,7 +59,7 @@ impl EarlyProps {
59
59
rdr,
60
60
& mut |DirectiveLine { directive : ln, .. } | {
61
61
parse_and_update_aux ( config, ln, & mut props. aux ) ;
62
- config. parse_and_update_revisions ( ln, & mut props. revisions ) ;
62
+ config. parse_and_update_revisions ( testfile , ln, & mut props. revisions ) ;
63
63
} ,
64
64
) ;
65
65
@@ -391,7 +391,7 @@ impl TestProps {
391
391
has_edition = true ;
392
392
}
393
393
394
- config. parse_and_update_revisions ( ln, & mut self . revisions ) ;
394
+ config. parse_and_update_revisions ( testfile , ln, & mut self . revisions ) ;
395
395
396
396
if let Some ( flags) = config. parse_name_value_directive ( ln, RUN_FLAGS ) {
397
397
self . run_flags . extend ( split_flags ( & flags) ) ;
@@ -897,12 +897,21 @@ fn iter_header(
897
897
}
898
898
899
899
impl Config {
900
- fn parse_and_update_revisions ( & self , line : & str , existing : & mut Vec < String > ) {
900
+ fn parse_and_update_revisions ( & self , testfile : & Path , line : & str , existing : & mut Vec < String > ) {
901
901
if let Some ( raw) = self . parse_name_value_directive ( line, "revisions" ) {
902
+ if self . mode == Mode :: RunMake {
903
+ panic ! ( "`run-make` tests do not support revisions: {}" , testfile. display( ) ) ;
904
+ }
905
+
902
906
let mut duplicates: HashSet < _ > = existing. iter ( ) . cloned ( ) . collect ( ) ;
903
907
for revision in raw. split_whitespace ( ) . map ( |r| r. to_string ( ) ) {
904
908
if !duplicates. insert ( revision. clone ( ) ) {
905
- panic ! ( "Duplicate revision: `{}` in line `{}`" , revision, raw) ;
909
+ panic ! (
910
+ "duplicate revision: `{}` in line `{}`: {}" ,
911
+ revision,
912
+ raw,
913
+ testfile. display( )
914
+ ) ;
906
915
}
907
916
existing. push ( revision) ;
908
917
}
0 commit comments