about summary refs log tree commit diff
path: root/compiler/rustc_lint/src/impl_trait_overcaptures.rs
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2025-01-04 11:30:31 +0100
committerRalf Jung <post@ralfj.de>2025-01-04 11:35:31 +0100
commitbe65012aa34aa3b8d27e0e372b9eb86743d5aa8f (patch)
treedc1f494a710d956e2ea18047b87a81225857db00 /compiler/rustc_lint/src/impl_trait_overcaptures.rs
parentc528b8c67895bfe7fdcdfeb56ec5bf6ef928dcd7 (diff)
downloadrust-be65012aa34aa3b8d27e0e372b9eb86743d5aa8f.tar.gz
rust-be65012aa34aa3b8d27e0e372b9eb86743d5aa8f.zip
turn hir::ItemKind::Fn into a named-field variant
Diffstat (limited to 'compiler/rustc_lint/src/impl_trait_overcaptures.rs')
-rw-r--r--compiler/rustc_lint/src/impl_trait_overcaptures.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/impl_trait_overcaptures.rs b/compiler/rustc_lint/src/impl_trait_overcaptures.rs
index b5dd6cf16ee..7f603f6a655 100644
--- a/compiler/rustc_lint/src/impl_trait_overcaptures.rs
+++ b/compiler/rustc_lint/src/impl_trait_overcaptures.rs
@@ -112,7 +112,7 @@ declare_lint_pass!(
 impl<'tcx> LateLintPass<'tcx> for ImplTraitOvercaptures {
     fn check_item(&mut self, cx: &LateContext<'tcx>, it: &'tcx hir::Item<'tcx>) {
         match &it.kind {
-            hir::ItemKind::Fn(..) => check_fn(cx.tcx, it.owner_id.def_id),
+            hir::ItemKind::Fn { .. } => check_fn(cx.tcx, it.owner_id.def_id),
             _ => {}
         }
     }