@@ -59,7 +59,7 @@ impl EarlyProps {
5959 rdr,
6060 & mut |DirectiveLine { directive : ln, .. } | {
6161 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 ) ;
6363 } ,
6464 ) ;
6565
@@ -391,7 +391,7 @@ impl TestProps {
391391 has_edition = true ;
392392 }
393393
394- config. parse_and_update_revisions ( ln, & mut self . revisions ) ;
394+ config. parse_and_update_revisions ( testfile , ln, & mut self . revisions ) ;
395395
396396 if let Some ( flags) = config. parse_name_value_directive ( ln, RUN_FLAGS ) {
397397 self . run_flags . extend ( split_flags ( & flags) ) ;
@@ -897,12 +897,21 @@ fn iter_header(
897897}
898898
899899impl 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 > ) {
901901 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+
902906 let mut duplicates: HashSet < _ > = existing. iter ( ) . cloned ( ) . collect ( ) ;
903907 for revision in raw. split_whitespace ( ) . map ( |r| r. to_string ( ) ) {
904908 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+ ) ;
906915 }
907916 existing. push ( revision) ;
908917 }
0 commit comments