about summary refs log tree commit diff
path: root/compiler/rustc_ast_lowering/src/asm.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-08-21 00:57:58 -0400
committerMichael Goulet <michael@errs.io>2024-08-21 01:31:11 -0400
commit25ff9b6bcbba9e7831eb4d6eba2df6bbcd267c55 (patch)
tree7c081b337e865ac7a20217d90e29a14ce63dcef0 /compiler/rustc_ast_lowering/src/asm.rs
parent4d5b3b196284aded6ae99d12bcf149ffdc8ef379 (diff)
downloadrust-25ff9b6bcbba9e7831eb4d6eba2df6bbcd267c55.tar.gz
rust-25ff9b6bcbba9e7831eb4d6eba2df6bbcd267c55.zip
Use bool in favor of Option<()> for diagnostics
Diffstat (limited to 'compiler/rustc_ast_lowering/src/asm.rs')
-rw-r--r--compiler/rustc_ast_lowering/src/asm.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_ast_lowering/src/asm.rs b/compiler/rustc_ast_lowering/src/asm.rs
index 7d9d689e6d7..51cbe808a3a 100644
--- a/compiler/rustc_ast_lowering/src/asm.rs
+++ b/compiler/rustc_ast_lowering/src/asm.rs
@@ -86,9 +86,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
                                 // Multiple different abi names may actually be the same ABI
                                 // If the specified ABIs are not the same name, alert the user that they resolve to the same ABI
                                 let source_map = self.tcx.sess.source_map();
-                                let equivalent = (source_map.span_to_snippet(*prev_sp)
-                                    != source_map.span_to_snippet(*abi_span))
-                                .then_some(());
+                                let equivalent = source_map.span_to_snippet(*prev_sp)
+                                    != source_map.span_to_snippet(*abi_span);
 
                                 self.dcx().emit_err(AbiSpecifiedMultipleTimes {
                                     abi_span: *abi_span,