add lint for inline asm labels that look like binary
This commit is contained in:
parent
35b658fb10
commit
87856c4461
8 changed files with 397 additions and 91 deletions
|
@ -2040,10 +2040,32 @@ pub struct UnitBindingsDiag {
|
|||
}
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(lint_builtin_asm_labels)]
|
||||
#[help]
|
||||
#[note]
|
||||
pub struct BuiltinNamedAsmLabel;
|
||||
pub enum InvalidAsmLabel {
|
||||
#[diag(lint_invalid_asm_label_named)]
|
||||
#[help]
|
||||
#[note]
|
||||
Named {
|
||||
#[note(lint_invalid_asm_label_no_span)]
|
||||
missing_precise_span: bool,
|
||||
},
|
||||
#[diag(lint_invalid_asm_label_format_arg)]
|
||||
#[help]
|
||||
#[note(lint_note1)]
|
||||
#[note(lint_note2)]
|
||||
FormatArg {
|
||||
#[note(lint_invalid_asm_label_no_span)]
|
||||
missing_precise_span: bool,
|
||||
},
|
||||
#[diag(lint_invalid_asm_label_binary)]
|
||||
#[note]
|
||||
Binary {
|
||||
#[note(lint_invalid_asm_label_no_span)]
|
||||
missing_precise_span: bool,
|
||||
// hack to get a label on the whole span, must match the emitted span
|
||||
#[label]
|
||||
span: Span,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Subdiagnostic)]
|
||||
pub enum UnexpectedCfgCargoHelp {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue