From 8d11dbf105726c5c53969a11ec362198006438c2 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Wed, 18 Sep 2024 12:15:49 -0400 Subject: [PATCH] Fix rust-analyzer to stop unnecessarily using Captures for RPITIT --- .../hir-ty/src/diagnostics/match_check/pat_analysis.rs | 10 +++++----- 1 file 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 1066a28c3ff88..86f9ad8c199a1 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<'db> PatCx for MatchCheckCtx<'db> { } } - fn ctor_sub_tys<'a>( - &'a self, - ctor: &'a rustc_pattern_analysis::constructor::Constructor, - ty: &'a Self::Ty, - ) -> impl ExactSizeIterator + Captures<'a> { + fn ctor_sub_tys( + &self, + ctor: &rustc_pattern_analysis::constructor::Constructor, + ty: &Self::Ty, + ) -> impl ExactSizeIterator { let single = |ty| smallvec![(ty, PrivateUninhabitedField(false))]; let tys: SmallVec<[_; 2]> = match ctor { Struct | Variant(_) | UnionField => match ty.kind(Interner) {