-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Open
Labels
A-inline-assemblyArea: Inline assembly (`asm!(…)`)Area: Inline assembly (`asm!(…)`)A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.L-false-positiveLint: False positive (should not have fired).Lint: False positive (should not have fired).T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Code
// In hexagon assembly syntax, register pairs are delimited with colons like `r17:16`.
pub unsafe fn hexagon_regpair_example() {
asm!(
// this instruction performs a double-word load to r1 and r0
"r1:0 = memd(r29+#0)",
lateout("r0") _, lateout("r1") _
);
}
Current output
error: avoid using named labels in inline assembly
--> src/lib.rs:23:10
|
23 | "r1:0 = memd(r29+#0)",
| ^^
|
Desired output
<not an error - no diagnostic emitted>
Rationale and extra context
No response
Other cases
Rust Version
$ rustc --version
rustc 1.89.0-nightly (49a8ba068 2025-06-14)
Anything else?
If you have a pointer to other similar "narrowing the pattern matched for this diag" commit(s) I can make the change.
Metadata
Metadata
Assignees
Labels
A-inline-assemblyArea: Inline assembly (`asm!(…)`)Area: Inline assembly (`asm!(…)`)A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.L-false-positiveLint: False positive (should not have fired).Lint: False positive (should not have fired).T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.