ensure //@compile-flags are last even when passing --edition
This commit is contained in:
parent
cd371b90e2
commit
cd3a7bb961
1 changed files with 6 additions and 2 deletions
|
|
@ -385,7 +385,9 @@ impl TestProps {
|
|||
}
|
||||
|
||||
if let Some(edition) = config.parse_edition(ln) {
|
||||
self.compile_flags.push(format!("--edition={}", edition.trim()));
|
||||
// The edition is added at the start, since flags from //@compile-flags must
|
||||
// be passed to rustc last.
|
||||
self.compile_flags.insert(0, format!("--edition={}", edition.trim()));
|
||||
has_edition = true;
|
||||
}
|
||||
|
||||
|
|
@ -606,7 +608,9 @@ impl TestProps {
|
|||
}
|
||||
|
||||
if let (Some(edition), false) = (&config.edition, has_edition) {
|
||||
self.compile_flags.push(format!("--edition={}", edition));
|
||||
// The edition is added at the start, since flags from //@compile-flags must be passed
|
||||
// to rustc last.
|
||||
self.compile_flags.insert(0, format!("--edition={}", edition));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue