Skip to content

Commit 1c7fb0f

Browse files
committed
do not completely suppress warning with test code
1 parent 52aa383 commit 1c7fb0f

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

clippy_lints/src/exit.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ declare_lint_pass!(Exit => [EXIT]);
5656

5757
impl<'tcx> LateLintPass<'tcx> for Exit {
5858
fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) {
59-
if cx.sess().is_test_crate() {
60-
return;
61-
}
62-
6359
if let ExprKind::Call(path_expr, [_]) = e.kind
6460
&& let ExprKind::Path(ref path) = path_expr.kind
6561
&& let Some(def_id) = cx.qpath_res(path, path_expr.hir_id).opt_def_id()

0 commit comments

Comments
 (0)