@@ -208,6 +208,8 @@ pub struct TestProps {
208208 pub llvm_cov_flags : Vec < String > ,
209209 /// Extra flags to pass to LLVM's `filecheck` tool, in tests that use it.
210210 pub filecheck_flags : Vec < String > ,
211+ /// Don't automatically insert any `--check-cfg` args
212+ pub no_auto_check_cfg : bool ,
211213}
212214
213215mod directives {
@@ -249,6 +251,7 @@ mod directives {
249251 pub const COMPARE_OUTPUT_LINES_BY_SUBSET : & ' static str = "compare-output-lines-by-subset" ;
250252 pub const LLVM_COV_FLAGS : & ' static str = "llvm-cov-flags" ;
251253 pub const FILECHECK_FLAGS : & ' static str = "filecheck-flags" ;
254+ pub const NO_AUTO_CHECK_CFG : & ' static str = "no-auto-check-cfg" ;
252255 // This isn't a real directive, just one that is probably mistyped often
253256 pub const INCORRECT_COMPILER_FLAGS : & ' static str = "compiler-flags" ;
254257}
@@ -304,6 +307,7 @@ impl TestProps {
304307 remap_src_base : false ,
305308 llvm_cov_flags : vec ! [ ] ,
306309 filecheck_flags : vec ! [ ] ,
310+ no_auto_check_cfg : false ,
307311 }
308312 }
309313
@@ -567,6 +571,8 @@ impl TestProps {
567571 if let Some ( flags) = config. parse_name_value_directive ( ln, FILECHECK_FLAGS ) {
568572 self . filecheck_flags . extend ( split_flags ( & flags) ) ;
569573 }
574+
575+ config. set_name_directive ( ln, NO_AUTO_CHECK_CFG , & mut self . no_auto_check_cfg ) ;
570576 } ,
571577 ) ;
572578
@@ -860,6 +866,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
860866 "needs-unwind" ,
861867 "needs-wasmtime" ,
862868 "needs-xray" ,
869+ "no-auto-check-cfg" ,
863870 "no-prefer-dynamic" ,
864871 "normalize-stderr-32bit" ,
865872 "normalize-stderr-64bit" ,
0 commit comments