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 {
189
189
pub const STDERR_PER_BITWIDTH: &'static str = "stderr-per-bitwidth";
190
190
pub const INCREMENTAL: &'static str = "incremental";
191
191
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";
192
194
}
193
195
194
196
impl TestProps {
@@ -282,6 +284,9 @@ impl TestProps {
282
284
if let Some(flags) = config.parse_name_value_directive(ln, COMPILE_FLAGS) {
283
285
self.compile_flags.extend(flags.split_whitespace().map(|s| s.to_owned()));
284
286
}
287
+ if config.parse_name_value_directive(ln, INCORRECT_COMPILER_FLAGS).is_some() {
288
+ panic!("`compiler-flags` directive should be spelled `compile-flags`");
289
+ }
285
290
286
291
if let Some(edition) = config.parse_edition(ln) {
287
292
self.compile_flags.push(format!("--edition={}", edition));
You can’t perform that action at this time.
0 commit comments