Rollup merge of #58400 - gnzlbg:fix_driver, r=oli-obk
Fix rustc_driver swallowing errors when compilation is stopped r? @oli-obk
This commit is contained in:
commit
0178f31869
1 changed files with 5 additions and 0 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue