Skip to content

Commit 7b40b73

Browse files
author
Rajkumar Natarajan
committed
issue_6357 update unreachable macro usage
1 parent 7a73a25 commit 7b40b73

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

clippy_lints/src/panic_unimplemented.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ declare_clippy_lint! {
6666
/// ```
6767
pub UNREACHABLE,
6868
restriction,
69-
"`unreachable!` should not be present in production code"
69+
"usage of the `unreachable!` macro"
7070
}
7171

7272
declare_lint_pass!(PanicUnimplemented => [UNIMPLEMENTED, UNREACHABLE, TODO, PANIC]);
@@ -85,12 +85,7 @@ impl<'tcx> LateLintPass<'tcx> for PanicUnimplemented {
8585
} else if is_expn_of(expr.span, "todo").is_some() {
8686
span_lint(cx, TODO, span, "`todo` should not be present in production code");
8787
} else if is_expn_of(expr.span, "unreachable").is_some() {
88-
span_lint(
89-
cx,
90-
UNREACHABLE,
91-
span,
92-
"`unreachable` should not be present in production code",
93-
);
88+
span_lint(cx, UNREACHABLE, span, "usage of the `unreachable!` macro");
9489
} else if is_expn_of(expr.span, "panic").is_some() {
9590
span_lint(cx, PANIC, span, "`panic` should not be present in production code");
9691
}

0 commit comments

Comments
 (0)