diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-19 10:23:58 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-22 08:03:47 +1100 |
| commit | 4da67fff61ccc460370df6047563f8091c7e66bd (patch) | |
| tree | 761249125161b8904d059dadc89e77225b664114 /compiler/rustc_session/src | |
| parent | 44006444c8c85a0102984a4323755da0084a681e (diff) | |
| download | rust-4da67fff61ccc460370df6047563f8091c7e66bd.tar.gz rust-4da67fff61ccc460370df6047563f8091c7e66bd.zip | |
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()`.
Diffstat (limited to 'compiler/rustc_session/src')
| -rw-r--r-- | compiler/rustc_session/src/output.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_session/src/output.rs b/compiler/rustc_session/src/output.rs index db976b30404..74d26237f24 100644 --- a/compiler/rustc_session/src/output.rs +++ b/compiler/rustc_session/src/output.rs @@ -6,6 +6,7 @@ use crate::errors::{ }; use crate::Session; use rustc_ast::{self as ast, attr}; +use rustc_errors::FatalError; use rustc_span::symbol::sym; use rustc_span::{Span, Symbol}; use std::path::Path; @@ -115,7 +116,7 @@ pub fn validate_crate_name(sess: &Session, s: Symbol, sp: Option<Span>) { } if err_count > 0 { - sess.dcx().abort_if_errors(); + FatalError.raise(); } } |
