diff options
| author | gnzlbg <gonzalobg88@gmail.com> | 2019-02-12 11:40:36 +0100 |
|---|---|---|
| committer | gnzlbg <gonzalobg88@gmail.com> | 2019-02-12 16:16:12 +0100 |
| commit | 3a8448c3ff811d301c06bae6772b393d0236e363 (patch) | |
| tree | 9be4d260ba0626dd79366bbe9dda747e0e7dc7cb | |
| parent | d1731801163df1d3a8d4ddfa68adac2ec833ef7f (diff) | |
| download | rust-3a8448c3ff811d301c06bae6772b393d0236e363.tar.gz rust-3a8448c3ff811d301c06bae6772b393d0236e363.zip | |
Fix rustc_driver swallowing errors when compilation is stopped
| -rw-r--r-- | src/librustc_driver/driver.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/librustc_driver/driver.rs b/src/librustc_driver/driver.rs index 6a23cadf877..12cea306288 100644 --- a/src/librustc_driver/driver.rs +++ b/src/librustc_driver/driver.rs @@ -296,6 +296,11 @@ pub fn compile_input( (control.after_analysis.callback)(&mut state); }); + // Plugins like clippy and rust-semverver stop the analysis early, + // but want to still return an error if errors during the analysis + // happened: + tcx.sess.compile_status()?; + if control.after_analysis.stop == Compilation::Stop { return result.and_then(|_| Err(CompileIncomplete::Stopped)); } |
