@@ -289,20 +289,20 @@ impl TestProps {
289
289
}
290
290
}
291
291
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 {
293
293
let mut props = TestProps :: new ( ) ;
294
294
295
295
// copy over select properties to the aux build:
296
296
props. incremental_dir = self . incremental_dir . clone ( ) ;
297
297
props. ignore_pass = true ;
298
- props. load_from ( testfile, cfg , config) ;
298
+ props. load_from ( testfile, revision , config) ;
299
299
300
300
props
301
301
}
302
302
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 {
304
304
let mut props = TestProps :: new ( ) ;
305
- props. load_from ( testfile, cfg , config) ;
305
+ props. load_from ( testfile, revision , config) ;
306
306
307
307
match ( props. pass_mode , props. fail_mode ) {
308
308
( None , None ) if config. mode == Mode :: Ui => props. fail_mode = Some ( FailMode :: Check ) ,
@@ -315,9 +315,9 @@ impl TestProps {
315
315
316
316
/// Loads properties from `testfile` into `props`. If a property is
317
317
/// 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
319
319
/// `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 ) {
321
321
let mut has_edition = false ;
322
322
if !testfile. is_dir ( ) {
323
323
let file = File :: open ( testfile) . unwrap ( ) ;
@@ -331,7 +331,7 @@ impl TestProps {
331
331
testfile,
332
332
file,
333
333
& 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 {
335
335
return ;
336
336
}
337
337
@@ -455,7 +455,7 @@ impl TestProps {
455
455
& mut self . check_test_line_numbers_match ,
456
456
) ;
457
457
458
- self . update_pass_mode ( ln, cfg , config) ;
458
+ self . update_pass_mode ( ln, test_revision , config) ;
459
459
self . update_fail_mode ( ln, config) ;
460
460
461
461
config. set_name_directive ( ln, IGNORE_PASS , & mut self . ignore_pass ) ;
@@ -645,7 +645,7 @@ impl TestProps {
645
645
}
646
646
}
647
647
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.
649
649
///
650
650
/// See [`HeaderLine`] for a diagram.
651
651
pub fn line_directive < ' line > (
@@ -664,8 +664,8 @@ pub fn line_directive<'line>(
664
664
) ;
665
665
} ;
666
666
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 ( ) ) )
669
669
} else {
670
670
Some ( ( None , ln) )
671
671
}
@@ -1176,7 +1176,7 @@ pub fn make_test_description<R: Read>(
1176
1176
name : test:: TestName ,
1177
1177
path : & Path ,
1178
1178
src : R ,
1179
- cfg : Option < & str > ,
1179
+ test_revision : Option < & str > ,
1180
1180
poisoned : & mut bool ,
1181
1181
) -> test:: TestDesc {
1182
1182
let mut ignore = false ;
@@ -1192,7 +1192,7 @@ pub fn make_test_description<R: Read>(
1192
1192
path,
1193
1193
src,
1194
1194
& 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 {
1196
1196
return ;
1197
1197
}
1198
1198
0 commit comments