1
Fork 0

Refactor rustc lint API

This commit is contained in:
Maybe Waffle 2022-09-16 11:01:02 +04:00
parent 65445a571c
commit a8f7e244b7
64 changed files with 1760 additions and 1555 deletions

View file

@ -48,11 +48,18 @@ fn maybe_lint_redundant_semis(cx: &EarlyContext<'_>, seq: &mut Option<(Span, boo
return;
}
cx.struct_span_lint(REDUNDANT_SEMICOLONS, span, |lint| {
lint.build(fluent::lint::redundant_semicolons)
.set_arg("multiple", multiple)
.span_suggestion(span, fluent::lint::suggestion, "", Applicability::MaybeIncorrect)
.emit();
});
cx.struct_span_lint(
REDUNDANT_SEMICOLONS,
span,
fluent::lint::redundant_semicolons,
|lint| {
lint.set_arg("multiple", multiple).span_suggestion(
span,
fluent::lint::suggestion,
"",
Applicability::MaybeIncorrect,
)
},
);
}
}