prevent configuring the edition with //@compile-flags
This commit is contained in:
parent
cd3a7bb961
commit
2638e4e8b2
1 changed files with 7 additions and 1 deletions
|
|
@ -378,7 +378,13 @@ impl TestProps {
|
|||
}
|
||||
|
||||
if let Some(flags) = config.parse_name_value_directive(ln, COMPILE_FLAGS) {
|
||||
self.compile_flags.extend(split_flags(&flags));
|
||||
let flags = split_flags(&flags);
|
||||
for flag in &flags {
|
||||
if flag == "--edition" || flag.starts_with("--edition=") {
|
||||
panic!("you must use `//@ edition` to configure the edition");
|
||||
}
|
||||
}
|
||||
self.compile_flags.extend(flags);
|
||||
}
|
||||
if config.parse_name_value_directive(ln, INCORRECT_COMPILER_FLAGS).is_some() {
|
||||
panic!("`compiler-flags` directive should be spelled `compile-flags`");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue