@@ -11,10 +11,10 @@ use tracing::*;
1111
1212use crate :: common:: { Config , Debugger , FailMode , Mode , PassMode } ;
1313use crate :: debuggers:: { extract_cdb_version, extract_gdb_version} ;
14- use crate :: errors:: ErrorKind ;
15- use crate :: executor:: { CollectedTestDesc , ShouldPanic } ;
1614use crate :: directives:: auxiliary:: { AuxProps , parse_and_update_aux} ;
1715use crate :: directives:: needs:: CachedNeedsConditions ;
16+ use crate :: errors:: ErrorKind ;
17+ use crate :: executor:: { CollectedTestDesc , ShouldPanic } ;
1818use crate :: help;
1919use crate :: util:: static_regex;
2020
@@ -138,12 +138,12 @@ pub struct TestProps {
138138 pub incremental_dir : Option < Utf8PathBuf > ,
139139 // If `true`, this test will use incremental compilation.
140140 //
141- // This can be set manually with the `incremental` header , or implicitly
141+ // This can be set manually with the `incremental` directive , or implicitly
142142 // by being a part of an incremental mode test. Using the `incremental`
143- // header should be avoided if possible; using an incremental mode test is
143+ // directive should be avoided if possible; using an incremental mode test is
144144 // preferred. Incremental mode tests support multiple passes, which can
145145 // verify that the incremental cache can be loaded properly after being
146- // created. Just setting the header will only verify the behavior with
146+ // created. Just setting the directive will only verify the behavior with
147147 // creating an incremental cache, but doesn't check that it is created
148148 // correctly.
149149 //
@@ -642,11 +642,11 @@ impl TestProps {
642642 let check_ui = |mode : & str | {
643643 // Mode::Crashes may need build-fail in order to trigger llvm errors or stack overflows
644644 if config. mode != Mode :: Ui && config. mode != Mode :: Crashes {
645- panic ! ( "`{}-fail` header is only supported in UI tests" , mode) ;
645+ panic ! ( "`{}-fail` directive is only supported in UI tests" , mode) ;
646646 }
647647 } ;
648648 if config. mode == Mode :: Ui && config. parse_name_directive ( ln, "compile-fail" ) {
649- panic ! ( "`compile-fail` header is useless in UI tests" ) ;
649+ panic ! ( "`compile-fail` directive is useless in UI tests" ) ;
650650 }
651651 let fail_mode = if config. parse_name_directive ( ln, "check-fail" ) {
652652 check_ui ( "check" ) ;
@@ -662,7 +662,7 @@ impl TestProps {
662662 } ;
663663 match ( self . fail_mode , fail_mode) {
664664 ( None , Some ( _) ) => self . fail_mode = fail_mode,
665- ( Some ( _) , Some ( _) ) => panic ! ( "multiple `*-fail` headers in a single test" ) ,
665+ ( Some ( _) , Some ( _) ) => panic ! ( "multiple `*-fail` directives in a single test" ) ,
666666 ( _, None ) => { }
667667 }
668668 }
@@ -674,10 +674,10 @@ impl TestProps {
674674 ( Mode :: Codegen , "build-pass" ) => ( ) ,
675675 ( Mode :: Incremental , _) => {
676676 if revision. is_some ( ) && !self . revisions . iter ( ) . all ( |r| r. starts_with ( "cfail" ) ) {
677- panic ! ( "`{s}` header is only supported in `cfail` incremental tests" )
677+ panic ! ( "`{s}` directive is only supported in `cfail` incremental tests" )
678678 }
679679 }
680- ( mode, _) => panic ! ( "`{s}` header is not supported in `{mode}` tests" ) ,
680+ ( mode, _) => panic ! ( "`{s}` directive is not supported in `{mode}` tests" ) ,
681681 } ;
682682 let pass_mode = if config. parse_name_directive ( ln, "check-pass" ) {
683683 check_no_run ( "check-pass" ) ;
@@ -693,7 +693,7 @@ impl TestProps {
693693 } ;
694694 match ( self . pass_mode , pass_mode) {
695695 ( None , Some ( _) ) => self . pass_mode = pass_mode,
696- ( Some ( _) , Some ( _) ) => panic ! ( "multiple `*-pass` headers in a single test" ) ,
696+ ( Some ( _) , Some ( _) ) => panic ! ( "multiple `*-pass` directives in a single test" ) ,
697697 ( _, None ) => { }
698698 }
699699 }
@@ -1163,8 +1163,7 @@ enum NormalizeKind {
11631163 Stderr64bit ,
11641164}
11651165
1166- /// Parses the regex and replacement values of a `//@ normalize-*` header,
1167- /// in the format:
1166+ /// Parses the regex and replacement values of a `//@ normalize-*` directive, in the format:
11681167/// ```text
11691168/// "REGEX" -> "REPLACEMENT"
11701169/// ```
0 commit comments