Add hard error for extern without explicit ABI

This commit is contained in:
Obei Sideg
2025-04-08 05:30:21 +03:00
parent ee53c26b41
commit 01cfa9aad5
4 changed files with 21 additions and 6 deletions

View File

@@ -823,3 +823,12 @@ pub(crate) struct DuplicatePreciseCapturing {
#[label]
pub bound2: Span,
}
#[derive(Diagnostic)]
#[diag(ast_passes_extern_without_abi)]
#[help]
pub(crate) struct MissingAbi {
#[primary_span]
#[suggestion(code = "extern \"<abi>\"", applicability = "has-placeholders")]
pub span: Span,
}