summary refs log tree commit diff
path: root/compiler/rustc_lint/src/redundant_semicolon.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_lint/src/redundant_semicolon.rs')
-rw-r--r--compiler/rustc_lint/src/redundant_semicolon.rs19
1 files changed, 13 insertions, 6 deletions
diff --git a/compiler/rustc_lint/src/redundant_semicolon.rs b/compiler/rustc_lint/src/redundant_semicolon.rs
index 26f41345383..46c84550e9f 100644
--- a/compiler/rustc_lint/src/redundant_semicolon.rs
+++ b/compiler/rustc_lint/src/redundant_semicolon.rs
@@ -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,
+                )
+            },
+        );
     }
 }