]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/clippy/clippy_lints/src/panic_in_result_fn.rs
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / tools / clippy / clippy_lints / src / panic_in_result_fn.rs
index 37e2b50def17a389b7473a280f59527f6ed2785b..207423a18614927f30960ba847b944170fbca91e 100644 (file)
@@ -43,9 +43,7 @@ impl<'tcx> LateLintPass<'tcx> for PanicInResultFn {
         span: Span,
         hir_id: hir::HirId,
     ) {
-        if !matches!(fn_kind, FnKind::Closure(_))
-            && is_type_diagnostic_item(cx, return_ty(cx, hir_id), sym::result_type)
-        {
+        if !matches!(fn_kind, FnKind::Closure) && is_type_diagnostic_item(cx, return_ty(cx, hir_id), sym::result_type) {
             lint_impl_body(cx, span, body);
         }
     }