Prefer to use has_errors to err_count

This commit is contained in:
Matthew Jasper 2019-06-22 12:44:03 +01:00
parent f693d339f1
commit 30b6c59f24
7 changed files with 19 additions and 25 deletions

View file

@ -346,7 +346,7 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt
// current architecture.
let resolver = abort_on_err(compiler.expansion(), sess).peek().1.clone();
if sess.err_count() > 0 {
if sess.has_errors() {
sess.fatal("Compilation failed, aborting rustdoc");
}