Introduce missing ABI lint on extern blocks

This commit is contained in:
Mark Rousskov 2020-09-01 17:12:38 -04:00
parent 9f3998b4aa
commit c4a8d7f86a
7 changed files with 68 additions and 7 deletions

View file

@ -600,6 +600,10 @@ pub trait LintContext: Sized {
BuiltinLintDiagnostics::PatternsInFnsWithoutBody(span, ident) => {
db.span_suggestion(span, "remove `mut` from the parameter", ident.to_string(), Applicability::MachineApplicable);
}
BuiltinLintDiagnostics::MissingAbi(span, default_abi) => {
db.span_label(span, "ABI should be specified here");
db.help(&format!("the default ABI is {}", default_abi.name()));
}
}
// Rewrap `db`, and pass control to the user.
decorate(LintDiagnosticBuilder::new(db));