Improve the missing_abi lint.
This commit is contained in:
parent
8b9f0f9c1c
commit
cb26fa07bb
7 changed files with 14 additions and 13 deletions
|
@ -268,7 +268,7 @@ lint_extern_crate_not_idiomatic = `extern crate` is not idiomatic in the new edi
|
|||
|
||||
lint_extern_without_abi = extern declarations without an explicit ABI are deprecated
|
||||
.label = ABI should be specified here
|
||||
.help = the default ABI is {$default_abi}
|
||||
.suggestion = explicitly specify the {$default_abi} ABI
|
||||
|
||||
lint_for_loops_over_fallibles =
|
||||
for loop over {$article} `{$ref_prefix}{$ty}`. This is more readably written as an `if let` statement
|
||||
|
|
|
@ -2738,11 +2738,9 @@ pub(crate) struct PatternsInFnsWithoutBodySub {
|
|||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(lint_extern_without_abi)]
|
||||
#[help]
|
||||
pub(crate) struct MissingAbi {
|
||||
#[label]
|
||||
#[suggestion(code = "extern \"{default_abi}\"", applicability = "machine-applicable")]
|
||||
pub span: Span,
|
||||
|
||||
pub default_abi: &'static str,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue