@@ -289,20 +289,20 @@ impl TestProps {
289289 }
290290 }
291291
292- pub fn from_aux_file ( & self , testfile : & Path , cfg : Option < & str > , config : & Config ) -> Self {
292+ pub fn from_aux_file ( & self , testfile : & Path , revision : Option < & str > , config : & Config ) -> Self {
293293 let mut props = TestProps :: new ( ) ;
294294
295295 // copy over select properties to the aux build:
296296 props. incremental_dir = self . incremental_dir . clone ( ) ;
297297 props. ignore_pass = true ;
298- props. load_from ( testfile, cfg , config) ;
298+ props. load_from ( testfile, revision , config) ;
299299
300300 props
301301 }
302302
303- pub fn from_file ( testfile : & Path , cfg : Option < & str > , config : & Config ) -> Self {
303+ pub fn from_file ( testfile : & Path , revision : Option < & str > , config : & Config ) -> Self {
304304 let mut props = TestProps :: new ( ) ;
305- props. load_from ( testfile, cfg , config) ;
305+ props. load_from ( testfile, revision , config) ;
306306
307307 match ( props. pass_mode , props. fail_mode ) {
308308 ( None , None ) if config. mode == Mode :: Ui => props. fail_mode = Some ( FailMode :: Check ) ,
@@ -315,9 +315,9 @@ impl TestProps {
315315
316316 /// Loads properties from `testfile` into `props`. If a property is
317317 /// tied to a particular revision `foo` (indicated by writing
318- /// `//[foo]`), then the property is ignored unless `cfg ` is
318+ /// `//@ [foo]`), then the property is ignored unless `test_revision ` is
319319 /// `Some("foo")`.
320- fn load_from ( & mut self , testfile : & Path , cfg : Option < & str > , config : & Config ) {
320+ fn load_from ( & mut self , testfile : & Path , test_revision : Option < & str > , config : & Config ) {
321321 let mut has_edition = false ;
322322 if !testfile. is_dir ( ) {
323323 let file = File :: open ( testfile) . unwrap ( ) ;
@@ -331,7 +331,7 @@ impl TestProps {
331331 testfile,
332332 file,
333333 & mut |HeaderLine { header_revision, directive : ln, .. } | {
334- if header_revision. is_some ( ) && header_revision != cfg {
334+ if header_revision. is_some ( ) && header_revision != test_revision {
335335 return ;
336336 }
337337
@@ -455,7 +455,7 @@ impl TestProps {
455455 & mut self . check_test_line_numbers_match ,
456456 ) ;
457457
458- self . update_pass_mode ( ln, cfg , config) ;
458+ self . update_pass_mode ( ln, test_revision , config) ;
459459 self . update_fail_mode ( ln, config) ;
460460
461461 config. set_name_directive ( ln, IGNORE_PASS , & mut self . ignore_pass ) ;
@@ -645,7 +645,7 @@ impl TestProps {
645645 }
646646}
647647
648- /// Extract a `(Option<line_config >, directive)` directive from a line if comment is present.
648+ /// Extract an `(Option<line_revision >, directive)` directive from a line if comment is present.
649649///
650650/// See [`HeaderLine`] for a diagram.
651651pub fn line_directive < ' line > (
@@ -664,8 +664,8 @@ pub fn line_directive<'line>(
664664 ) ;
665665 } ;
666666
667- let lncfg = & ln[ 1 ..close_brace] ;
668- Some ( ( Some ( lncfg ) , ln[ ( close_brace + 1 ) ..] . trim_start ( ) ) )
667+ let line_revision = & ln[ 1 ..close_brace] ;
668+ Some ( ( Some ( line_revision ) , ln[ ( close_brace + 1 ) ..] . trim_start ( ) ) )
669669 } else {
670670 Some ( ( None , ln) )
671671 }
@@ -1176,7 +1176,7 @@ pub fn make_test_description<R: Read>(
11761176 name : test:: TestName ,
11771177 path : & Path ,
11781178 src : R ,
1179- cfg : Option < & str > ,
1179+ test_revision : Option < & str > ,
11801180 poisoned : & mut bool ,
11811181) -> test:: TestDesc {
11821182 let mut ignore = false ;
@@ -1192,7 +1192,7 @@ pub fn make_test_description<R: Read>(
11921192 path,
11931193 src,
11941194 & mut |HeaderLine { header_revision, original_line, directive : ln, line_number } | {
1195- if header_revision. is_some ( ) && header_revision != cfg {
1195+ if header_revision. is_some ( ) && header_revision != test_revision {
11961196 return ;
11971197 }
11981198
0 commit comments