]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/cognitive_complexity.rs
Auto merge of #82754 - rylev:rusage-windows, r=pnkfelix
[rust.git] / src / tools / clippy / clippy_lints / src / cognitive_complexity.rs
index f21a734bb439fb4cbc273207d6638aacccbfc8de..658d445dfec54d0ad2e2a35bff964e571144bc84 100644 (file)
@@ -76,8 +76,8 @@ fn check<'tcx>(
 
         if rust_cc > self.limit.limit() {
             let fn_span = match kind {
-                FnKind::ItemFn(ident, _, _, _, _) | FnKind::Method(ident, _, _, _) => ident.span,
-                FnKind::Closure(_) => {
+                FnKind::ItemFn(ident, _, _, _) | FnKind::Method(ident, _, _) => ident.span,
+                FnKind::Closure => {
                     let header_span = body_span.with_hi(decl.output.span().lo());
                     let pos = snippet_opt(cx, header_span).and_then(|snip| {
                         let low_offset = snip.find('|')?;