Rollup merge of #132357 - m-ou-se:explicit-abi, r=compiler-errors
Improve missing_abi lint This is for the migration lint for https://github.com/rust-lang/rfcs/pull/3722 It is not yet marked as an edition migration lint, because `Edition2027` doesn't exist yet. The lint now includes a machine applicable suggestion: ``` warning: extern declarations without an explicit ABI are deprecated --> src/main.rs:3:1 | 3 | extern fn a() {} | ^^^^^^ help: explicitly specify the C ABI: `extern "C"` | ```
This commit is contained in:
commit
6b0c8cfedc
10 changed files with 17 additions and 19 deletions
|
@ -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