Skip to content

Commit

Permalink
Update the binary_asm_label message
Browse files Browse the repository at this point in the history
The link pointed to a closed issue. Create a new one and point the link
to it.

Also add a help message to hint what change the user could make.

Fixes: #127821
  • Loading branch information
tgross35 committed Jul 18, 2024
1 parent 9387a75 commit 300da2c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions compiler/rustc_lint/messages.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,9 @@ lint_inner_macro_attribute_unstable = inner macro attributes are unstable
lint_invalid_asm_label_binary = avoid using labels containing only the digits `0` and `1` in inline assembly
.label = use a different label that doesn't start with `0` or `1`
.note = an LLVM bug makes these labels ambiguous with a binary literal number
.note = see <https://bugs.llvm.org/show_bug.cgi?id=36144> for more information
.help = start numbering with `2` instead
.note1 = an LLVM bug makes these labels ambiguous with a binary literal number on x86
.note2 = see <https://github.com/llvm/llvm-project/issues/99547> for more information
lint_invalid_asm_label_format_arg = avoid using named labels in inline assembly
.help = only local labels of the form `<number>:` should be used in inline asm
Expand Down
4 changes: 3 additions & 1 deletion compiler/rustc_lint/src/lints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2066,7 +2066,9 @@ pub enum InvalidAsmLabel {
missing_precise_span: bool,
},
#[diag(lint_invalid_asm_label_binary)]
#[note]
#[help]
#[note(lint_note1)]
#[note(lint_note2)]
Binary {
#[note(lint_invalid_asm_label_no_span)]
missing_precise_span: bool,
Expand Down

0 comments on commit 300da2c

Please sign in to comment.