Skip to content

Commit fedd4c6

Browse files
committed
lint: port asm labels diagnostics
Signed-off-by: David Wood <[email protected]>
1 parent 5524ca1 commit fedd4c6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler/rustc_error_messages/locales/en-US/lint.ftl

+2
Original file line numberDiff line numberDiff line change
@@ -396,3 +396,5 @@ lint-builtin-clashing-extern-diff-name = `{$this_fi}` redeclares `{$orig}` with
396396
397397
lint-builtin-deref-nullptr = dereferencing a null pointer
398398
.label = this code causes undefined behavior when executed
399+
400+
lint-builtin-asm-labels = avoid using named labels in inline assembly

compiler/rustc_lint/src/builtin.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -3182,9 +3182,7 @@ impl<'tcx> LateLintPass<'tcx> for NamedAsmLabels {
31823182
NAMED_ASM_LABELS,
31833183
Some(target_spans),
31843184
|diag| {
3185-
let mut err =
3186-
diag.build("avoid using named labels in inline assembly");
3187-
err.emit();
3185+
diag.build(fluent::lint::builtin_asm_labels).emit();
31883186
},
31893187
BuiltinLintDiagnostics::NamedAsmLabel(
31903188
"only local labels of the form `<number>:` should be used in inline asm"

0 commit comments

Comments
 (0)