1
Fork 0

Fix rustc_driver swallowing errors when compilation is stopped

This commit is contained in:
gnzlbg 2019-02-12 11:40:36 +01:00
parent d173180116
commit 3a8448c3ff

View file

@ -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));
}