File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
src/tools/compiletest/src Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -189,6 +189,8 @@ mod directives {
189189 pub const STDERR_PER_BITWIDTH : & ' static str = "stderr-per-bitwidth" ;
190190 pub const INCREMENTAL : & ' static str = "incremental" ;
191191 pub const KNOWN_BUG : & ' static str = "known-bug" ;
192+ // This isn't a real directive, just one that is probably mistyped often
193+ pub const INCORRECT_COMPILER_FLAGS : & ' static str = "compiler-flags" ;
192194}
193195
194196impl TestProps {
@@ -282,6 +284,9 @@ impl TestProps {
282284 if let Some ( flags) = config. parse_name_value_directive ( ln, COMPILE_FLAGS ) {
283285 self . compile_flags . extend ( flags. split_whitespace ( ) . map ( |s| s. to_owned ( ) ) ) ;
284286 }
287+ if config. parse_name_value_directive ( ln, INCORRECT_COMPILER_FLAGS ) . is_some ( ) {
288+ panic ! ( "`compiler-flags` directive should be spelled `compile-flags`" ) ;
289+ }
285290
286291 if let Some ( edition) = config. parse_edition ( ln) {
287292 self . compile_flags . push ( format ! ( "--edition={}" , edition) ) ;
You can’t perform that action at this time.
0 commit comments