about summary refs log tree commit diff
path: root/compiler/rustc_errors
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2022-11-15 09:58:43 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2022-12-06 18:59:45 +0000
commit19d7dceed302b254f21fd77084ff6b468305058a (patch)
tree563054b8a2ef241107d4dffe6a834352e092f2bf /compiler/rustc_errors
parent9eb9176b08a4a61f7725e7da73558abc508404d9 (diff)
downloadrust-19d7dceed302b254f21fd77084ff6b468305058a.tar.gz
rust-19d7dceed302b254f21fd77084ff6b468305058a.zip
remove an unnecessary `?`
Diffstat (limited to 'compiler/rustc_errors')
-rw-r--r--compiler/rustc_errors/src/emitter.rs3
1 files changed, 1 insertions, 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) =