Replace unnecessary abort_if_errors
.
Replace `abort_if_errors` calls that are certain to abort -- because we emit an error immediately beforehand -- with `FatalErro.raise()`.
This commit is contained in:
parent
44006444c8
commit
4da67fff61
6 changed files with 13 additions and 23 deletions
|
@ -936,9 +936,7 @@ pub fn start_codegen<'tcx>(
|
|||
|
||||
if tcx.sess.opts.output_types.contains_key(&OutputType::Mir) {
|
||||
if let Err(error) = rustc_mir_transform::dump_mir::emit_mir(tcx) {
|
||||
let dcx = tcx.dcx();
|
||||
dcx.emit_err(errors::CantEmitMIR { error });
|
||||
dcx.abort_if_errors();
|
||||
tcx.dcx().emit_fatal(errors::CantEmitMIR { error });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue