Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 91453c9

Browse files
committedAug 21, 2024·
Use bool in favor of Option<()> for diagnostics
1 parent 4d5b3b1 commit 91453c9

File tree

48 files changed

+107
-120
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+107
-120
lines changed
 

‎compiler/rustc_ast_lowering/src/asm.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
8686
// Multiple different abi names may actually be the same ABI
8787
// If the specified ABIs are not the same name, alert the user that they resolve to the same ABI
8888
let source_map = self.tcx.sess.source_map();
89-
let equivalent = (source_map.span_to_snippet(*prev_sp)
90-
!= source_map.span_to_snippet(*abi_span))
91-
.then_some(());
89+
let equivalent = source_map.span_to_snippet(*prev_sp)
90+
!= source_map.span_to_snippet(*abi_span);
9291

9392
self.dcx().emit_err(AbiSpecifiedMultipleTimes {
9493
abi_span: *abi_span,

‎compiler/rustc_ast_lowering/src/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ pub struct AbiSpecifiedMultipleTimes {
184184
#[label]
185185
pub prev_span: Span,
186186
#[note]
187-
pub equivalent: Option<()>,
187+
pub equivalent: bool,
188188
}
189189

190190
#[derive(Diagnostic)]

0 commit comments

Comments
 (0)
Please sign in to comment.