From 19d7dceed302b254f21fd77084ff6b468305058a Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Tue, 15 Nov 2022 09:58:43 +0000 Subject: [PATCH] remove an unnecessary `?` --- compiler/rustc_errors/src/emitter.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs index cb5aadce8e3..ce5a91ef4a2 100644 --- a/compiler/rustc_errors/src/emitter.rs +++ b/compiler/rustc_errors/src/emitter.rs @@ -1389,8 +1389,7 @@ impl EmitterWriter { let primary_span = msp.primary_span().unwrap_or_default(); let (Some(sm), false) = (self.sm.as_ref(), primary_span.is_dummy()) else { // If we don't have span information, emit and exit - emit_to_destination(&buffer.render(), level, &mut self.dst, self.short_message)?; - return Ok(()); + return emit_to_destination(&buffer.render(), level, &mut self.dst, self.short_message); }; let primary_lo = sm.lookup_char_pos(primary_span.lo()); if let Ok(pos) =