@@ -59,7 +59,7 @@ impl EarlyProps {
59
59
rdr,
60
60
& mut |HeaderLine { 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) ) ;
@@ -907,12 +907,21 @@ fn iter_header(
907
907
}
908
908
909
909
impl Config {
910
- fn parse_and_update_revisions ( & self , line : & str , existing : & mut Vec < String > ) {
910
+ fn parse_and_update_revisions ( & self , testfile : & Path , line : & str , existing : & mut Vec < String > ) {
911
911
if let Some ( raw) = self . parse_name_value_directive ( line, "revisions" ) {
912
+ if self . mode == Mode :: RunMake {
913
+ panic ! ( "`run-make` tests do not support revisions: {}" , testfile. display( ) ) ;
914
+ }
915
+
912
916
let mut duplicates: HashSet < _ > = existing. iter ( ) . cloned ( ) . collect ( ) ;
913
917
for revision in raw. split_whitespace ( ) . map ( |r| r. to_string ( ) ) {
914
918
if !duplicates. insert ( revision. clone ( ) ) {
915
- panic ! ( "Duplicate revision: `{}` in line `{}`" , revision, raw) ;
919
+ panic ! (
920
+ "duplicate revision: `{}` in line `{}`: {}" ,
921
+ revision,
922
+ raw,
923
+ testfile. display( )
924
+ ) ;
916
925
}
917
926
existing. push ( revision) ;
918
927
}
0 commit comments