]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/panic_unimplemented.rs
Auto merge of #71780 - jcotton42:string_remove_matches, r=joshtriplett
[rust.git] / src / tools / clippy / clippy_lints / src / panic_unimplemented.rs
index 31b03ecd101c09daaab92d96f992521fc3cb5166..359620cc079752b806be469b03505d40aa4a2e1f 100644 (file)
@@ -66,7 +66,7 @@
     /// ```
     pub UNREACHABLE,
     restriction,
-    "`unreachable!` should not be present in production code"
+    "usage of the `unreachable!` macro"
 }
 
 declare_lint_pass!(PanicUnimplemented => [UNIMPLEMENTED, UNREACHABLE, TODO, PANIC]);
@@ -85,12 +85,7 @@ fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
             } else if is_expn_of(expr.span, "todo").is_some() {
                 span_lint(cx, TODO, span, "`todo` should not be present in production code");
             } else if is_expn_of(expr.span, "unreachable").is_some() {
-                span_lint(
-                    cx,
-                    UNREACHABLE,
-                    span,
-                    "`unreachable` should not be present in production code",
-                );
+                span_lint(cx, UNREACHABLE, span, "usage of the `unreachable!` macro");
             } else if is_expn_of(expr.span, "panic").is_some() {
                 span_lint(cx, PANIC, span, "`panic` should not be present in production code");
             }