Skip to content

Commit 3a8448c

Browse files
committed
Fix rustc_driver swallowing errors when compilation is stopped
1 parent d173180 commit 3a8448c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/librustc_driver/driver.rs

+5
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,11 @@ pub fn compile_input(
296296
(control.after_analysis.callback)(&mut state);
297297
});
298298

299+
// Plugins like clippy and rust-semverver stop the analysis early,
300+
// but want to still return an error if errors during the analysis
301+
// happened:
302+
tcx.sess.compile_status()?;
303+
299304
if control.after_analysis.stop == Compilation::Stop {
300305
return result.and_then(|_| Err(CompileIncomplete::Stopped));
301306
}

0 commit comments

Comments
 (0)