about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-02-20 18:58:46 +0000
committerMichael Goulet <michael@errs.io>2025-02-22 22:24:52 +0000
commit12e3911d81034864314503b9c2d9fba2773c7904 (patch)
tree3c137d293516116a798effc67b2077dbb2025941 /src
parent46420c96070b4c4bd8242f16d5806b8f26a57016 (diff)
downloadrust-12e3911d81034864314503b9c2d9fba2773c7904.tar.gz
rust-12e3911d81034864314503b9c2d9fba2773c7904.zip
Greatly simplify lifetime captures in edition 2024
Diffstat (limited to 'src')
-rw-r--r--src/tools/rust-analyzer/crates/hir-ty/src/diagnostics/match_check/pat_analysis.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/diagnostics/match_check/pat_analysis.rs b/src/tools/rust-analyzer/crates/hir-ty/src/diagnostics/match_check/pat_analysis.rs
index 3312da470c0..91eb59fb314 100644
--- a/src/tools/rust-analyzer/crates/hir-ty/src/diagnostics/match_check/pat_analysis.rs
+++ b/src/tools/rust-analyzer/crates/hir-ty/src/diagnostics/match_check/pat_analysis.rs
@@ -361,11 +361,11 @@ impl PatCx for MatchCheckCtx<'_> {
         }
     }
 
-    fn ctor_sub_tys<'a>(
-        &'a self,
-        ctor: &'a rustc_pattern_analysis::constructor::Constructor<Self>,
-        ty: &'a Self::Ty,
-    ) -> impl ExactSizeIterator<Item = (Self::Ty, PrivateUninhabitedField)> + Captures<'a> {
+    fn ctor_sub_tys(
+        &self,
+        ctor: &rustc_pattern_analysis::constructor::Constructor<Self>,
+        ty: &Self::Ty,
+    ) -> impl ExactSizeIterator<Item = (Self::Ty, PrivateUninhabitedField)> {
         let single = |ty| smallvec![(ty, PrivateUninhabitedField(false))];
         let tys: SmallVec<[_; 2]> = match ctor {
             Struct | Variant(_) | UnionField => match ty.kind(Interner) {