diff options
| author | David Wood <david.wood@huawei.com> | 2022-06-28 11:31:44 +0100 |
|---|---|---|
| committer | David Wood <david.wood@huawei.com> | 2022-06-30 08:59:22 +0100 |
| commit | 18a48c1d6c7815eb56bac3798819a3d109e5c95c (patch) | |
| tree | 96983f3719f71fff5cbddbf39b91b2204506e5b9 /compiler/rustc_lint/src | |
| parent | 284ec37810f7d93cee6fd0a177220fc55afb7755 (diff) | |
| download | rust-18a48c1d6c7815eb56bac3798819a3d109e5c95c.tar.gz rust-18a48c1d6c7815eb56bac3798819a3d109e5c95c.zip | |
lint: port anonymous parameter diagnostics
Signed-off-by: David Wood <david.wood@huawei.com>
Diffstat (limited to 'compiler/rustc_lint/src')
| -rw-r--r-- | compiler/rustc_lint/src/builtin.rs | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index 82b283ad4b5..b14a3294fbc 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -937,18 +937,14 @@ impl EarlyLintPass for AnonymousParameters { ("<type>", Applicability::HasPlaceholders) }; - lint.build( - "anonymous parameters are deprecated and will be \ - removed in the next edition", - ) - .span_suggestion( - arg.pat.span, - "try naming the parameter or explicitly \ - ignoring it", - format!("_: {}", ty_snip), - appl, - ) - .emit(); + lint.build(fluent::lint::builtin_anonymous_params) + .span_suggestion( + arg.pat.span, + fluent::lint::suggestion, + format!("_: {}", ty_snip), + appl, + ) + .emit(); }) } } |
