Inline and remove abort_on_err
.
It's clumsy and doesn't improve readability.
This commit is contained in:
parent
4da67fff61
commit
f16c226af3
3 changed files with 16 additions and 20 deletions
|
@ -78,8 +78,7 @@ use std::io::{self, IsTerminal};
|
|||
use std::process;
|
||||
use std::sync::{atomic::AtomicBool, Arc};
|
||||
|
||||
use rustc_driver::abort_on_err;
|
||||
use rustc_errors::ErrorGuaranteed;
|
||||
use rustc_errors::{ErrorGuaranteed, FatalError};
|
||||
use rustc_interface::interface;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_session::config::{make_crate_type_option, ErrorOutputType, RustcOptGroup};
|
||||
|
@ -779,7 +778,7 @@ fn main_args(
|
|||
}
|
||||
|
||||
compiler.enter(|queries| {
|
||||
let mut gcx = abort_on_err(queries.global_ctxt(), sess);
|
||||
let Ok(mut gcx) = queries.global_ctxt() else { FatalError.raise() };
|
||||
if sess.dcx().has_errors().is_some() {
|
||||
sess.dcx().fatal("Compilation failed, aborting rustdoc");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue