From b5e049de0850edd90b60753cf8c0df62b9e159a1 Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Sun, 28 Mar 2021 18:36:53 +0200 Subject: Remove dummy_config --- compiler/rustc_session/src/session.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'compiler/rustc_session/src') diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index 693f427d7af..43e0ac875bc 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -1591,7 +1591,7 @@ pub enum IncrCompSession { InvalidBecauseOfErrors { session_directory: PathBuf }, } -pub fn early_error(output: config::ErrorOutputType, msg: &str) -> ! { +pub fn early_error_no_abort(output: config::ErrorOutputType, msg: &str) { let emitter: Box = match output { config::ErrorOutputType::HumanReadable(kind) => { let (short, color_config) = kind.unzip(); @@ -1603,6 +1603,10 @@ pub fn early_error(output: config::ErrorOutputType, msg: &str) -> ! { }; let handler = rustc_errors::Handler::with_emitter(true, None, emitter); handler.struct_fatal(msg).emit(); +} + +pub fn early_error(output: config::ErrorOutputType, msg: &str) -> ! { + early_error_no_abort(output, msg); rustc_errors::FatalError.raise(); } -- cgit 1.4.1-3-g733a5