Don't proceed to codegen if there are lint errors
This commit is contained in:
parent
0ac13bd430
commit
c008bb0012
2 changed files with 1 additions and 5 deletions
|
@ -410,10 +410,6 @@ fn run_compiler(
|
||||||
sess.code_stats.print_type_sizes();
|
sess.code_stats.print_type_sizes();
|
||||||
}
|
}
|
||||||
|
|
||||||
if sess.diagnostic().has_errors_or_lint_errors() {
|
|
||||||
return Err(ErrorReported);
|
|
||||||
}
|
|
||||||
|
|
||||||
let linker = queries.linker()?;
|
let linker = queries.linker()?;
|
||||||
Ok(Some(linker))
|
Ok(Some(linker))
|
||||||
})?;
|
})?;
|
||||||
|
|
|
@ -411,7 +411,7 @@ impl Session {
|
||||||
self.diagnostic().abort_if_errors();
|
self.diagnostic().abort_if_errors();
|
||||||
}
|
}
|
||||||
pub fn compile_status(&self) -> Result<(), ErrorReported> {
|
pub fn compile_status(&self) -> Result<(), ErrorReported> {
|
||||||
if self.has_errors() {
|
if self.diagnostic().has_errors_or_lint_errors() {
|
||||||
self.diagnostic().emit_stashed_diagnostics();
|
self.diagnostic().emit_stashed_diagnostics();
|
||||||
Err(ErrorReported)
|
Err(ErrorReported)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue