diff options
| author | Ralf Jung <post@ralfj.de> | 2020-04-10 10:30:04 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2020-04-10 10:30:04 +0200 |
| commit | b973cb70bf9afefbbd987d23137416bf3c4037cb (patch) | |
| tree | d86d113d2a1483135fe4e366fbcfb0763eda7b84 | |
| parent | 93dc97a85381cc52eb872d27e50e4d518926a27c (diff) | |
| download | rust-b973cb70bf9afefbbd987d23137416bf3c4037cb.tar.gz rust-b973cb70bf9afefbbd987d23137416bf3c4037cb.zip | |
compiletest: let config flags overwrite -A unused
| -rw-r--r-- | src/tools/compiletest/src/runtest.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 26a9cd11997..2944864abbf 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -1958,6 +1958,12 @@ impl<'test> TestCx<'test> { None => {} } + // Add `-A unused` before `config` flags and in-test (`props`) flags, so that they can + // overwrite this. + if let AllowUnused::Yes = allow_unused { + rustc.args(&["-A", "unused"]); + } + if self.props.force_host { self.maybe_add_external_args( &mut rustc, @@ -1980,10 +1986,6 @@ impl<'test> TestCx<'test> { rustc.arg("-Ctarget-feature=-crt-static"); } - if let AllowUnused::Yes = allow_unused { - rustc.args(&["-A", "unused"]); - } - rustc.args(&self.props.compile_flags); rustc |
