Skip to content

Commit 4e0eeea

Browse files
committed
only emit binary_asm_labels on intel syntax
1 parent 6938bfb commit 4e0eeea

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

compiler/rustc_lint/src/builtin.rs

+10-5
Original file line numberDiff line numberDiff line change
@@ -2978,11 +2978,16 @@ impl<'tcx> LateLintPass<'tcx> for AsmLabels {
29782978
InvalidAsmLabel::FormatArg { missing_precise_span },
29792979
);
29802980
}
2981-
AsmLabelKind::Binary => cx.emit_span_lint(
2982-
BINARY_ASM_LABELS,
2983-
span,
2984-
InvalidAsmLabel::Binary { missing_precise_span },
2985-
),
2981+
AsmLabelKind::Binary => {
2982+
// the binary asm issue only occurs when using intel syntax
2983+
if !options.contains(InlineAsmOptions::ATT_SYNTAX) {
2984+
cx.emit_span_lint(
2985+
BINARY_ASM_LABELS,
2986+
span,
2987+
InvalidAsmLabel::Binary { missing_precise_span },
2988+
)
2989+
}
2990+
}
29862991
};
29872992
}
29882993
}

0 commit comments

Comments
 (0)