We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cf636c2 commit 476a3c6Copy full SHA for 476a3c6
src/librustc_driver/driver.rs
@@ -52,12 +52,22 @@ pub fn compile_input(sess: Session,
52
addl_plugins: Option<Vec<String>>,
53
control: CompileController) {
54
macro_rules! controller_entry_point{($point: ident, $make_state: expr) => ({
55
+ let err_count;
56
{
57
let state = $make_state;
58
+ err_count = (*state.session).err_count();
59
(control.$point.callback)(state);
60
}
61
if control.$point.stop == Compilation::Stop {
- return;
62
+ let s;
63
+ match err_count {
64
+ 0 => return,
65
+ 1 => s = "build failed due to previous error".to_string(),
66
+ _ => {
67
+ s = format!("builed failed due to {} previous errors", err_count);
68
+ }
69
70
+ panic!(s);
71
72
})}
73
0 commit comments