Skip to content

Commit

Permalink
only emit binary_asm_labels on intel syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
asquared31415 committed Jun 29, 2024
1 parent 6938bfb commit 4e0eeea
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions compiler/rustc_lint/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2978,11 +2978,16 @@ impl<'tcx> LateLintPass<'tcx> for AsmLabels {
InvalidAsmLabel::FormatArg { missing_precise_span },
);
}
AsmLabelKind::Binary => cx.emit_span_lint(
BINARY_ASM_LABELS,
span,
InvalidAsmLabel::Binary { missing_precise_span },
),
AsmLabelKind::Binary => {
// the binary asm issue only occurs when using intel syntax
if !options.contains(InlineAsmOptions::ATT_SYNTAX) {
cx.emit_span_lint(
BINARY_ASM_LABELS,
span,
InvalidAsmLabel::Binary { missing_precise_span },
)
}
}
};
}
}
Expand Down

0 comments on commit 4e0eeea

Please sign in to comment.