lint: port impl LintPass by hand diagnostics

Signed-off-by: David Wood <david.wood@huawei.com>
This commit is contained in:
David Wood 2022-06-27 15:09:24 +01:00
parent 0996a7ab5c
commit 1c3a3e0711
2 changed files with 5 additions and 2 deletions

View File

@ -43,3 +43,6 @@ lint-tykind = usage of `ty::TyKind`
lint-ty-qualified = usage of qualified `ty::{$ty}`
.suggestion = try importing it and using it unqualified
lint-lintpass-by-hand = implementing `LintPass` by hand
.help = try using `declare_lint_pass!` or `impl_lint_pass!` instead

View File

@ -325,8 +325,8 @@ impl EarlyLintPass for LintPassImpl {
LINT_PASS_IMPL_WITHOUT_MACRO,
lint_pass.path.span,
|lint| {
lint.build("implementing `LintPass` by hand")
.help("try using `declare_lint_pass!` or `impl_lint_pass!` instead")
lint.build(fluent::lint::lintpass_by_hand)
.help(fluent::lint::help)
.emit();
},
)