diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-02-23 03:18:53 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-02-26 20:24:00 +0300 |
| commit | cdbd8c2f2aa69c4b8fe6f004449440e87c4ab87e (patch) | |
| tree | 3cb1d034cf3a10a3ff41ef80013322ee7358dbf5 /src/tools/compiletest | |
| parent | bedbad61195d2eae69b43eca49c6d3e2aee8f208 (diff) | |
| download | rust-cdbd8c2f2aa69c4b8fe6f004449440e87c4ab87e.tar.gz rust-cdbd8c2f2aa69c4b8fe6f004449440e87c4ab87e.zip | |
Support flag `-Z ui-testing` for tweaking diagnostic output for UI tests
Diffstat (limited to 'src/tools/compiletest')
| -rw-r--r-- | src/tools/compiletest/src/runtest.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index e5bee56de80..3d751de3dbe 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -1627,15 +1627,12 @@ impl<'test> TestCx<'test> { rustc.args(&["--error-format", "json"]); } } - Ui => if !self.props - .compile_flags - .iter() - .any(|s| s.starts_with("--error-format")) - { + Ui => { // In case no "--error-format" has been given in the test, we'll compile // a first time to get the compiler's output then compile with // "--error-format json" to check if all expected errors are actually there // and that no new one appeared. + rustc.arg("-Zui-testing"); } MirOpt => { rustc.args(&[ |
