diff options
| author | zachs18 <8355914+zachs18@users.noreply.github.com> | 2025-06-29 22:36:53 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-29 22:36:53 -0500 |
| commit | bc06bb193da786e11f42f10574024c46b0428663 (patch) | |
| tree | 6d2269ec01d6ce342bd93e72006db145cf1659d0 /src/tools | |
| parent | 2a66a5b7d54cab656722b25b2a2a0f1e2825ef4b (diff) | |
| download | rust-bc06bb193da786e11f42f10574024c46b0428663.tar.gz rust-bc06bb193da786e11f42f10574024c46b0428663.zip | |
Remove last use of `rustc_pat_analysis::Captures`
It's not necessary anymore due to Rust 2024 lifetime capture rules.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/rust-analyzer/crates/hir-ty/src/diagnostics/match_check/pat_analysis.rs | 10 |
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 b79c8c2ab19..7cf22c64d0f 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 @@ -6,7 +6,7 @@ use std::fmt; use hir_def::{DefWithBodyId, EnumId, EnumVariantId, HasModule, LocalFieldId, ModuleId, VariantId}; use intern::sym; use rustc_pattern_analysis::{ - Captures, IndexVec, PatCx, PrivateUninhabitedField, + IndexVec, PatCx, PrivateUninhabitedField, constructor::{Constructor, ConstructorSet, VariantVisibility}, usefulness::{PlaceValidity, UsefulnessReport, compute_match_usefulness}, }; @@ -138,11 +138,11 @@ impl<'db> MatchCheckCtx<'db> { } // This lists the fields of a variant along with their types. - fn list_variant_fields<'a>( - &'a self, - ty: &'a Ty, + fn list_variant_fields( + &self, + ty: &Ty, variant: VariantId, - ) -> impl Iterator<Item = (LocalFieldId, Ty)> + Captures<'a> + Captures<'db> { + ) -> impl Iterator<Item = (LocalFieldId, Ty)> { let (_, substs) = ty.as_adt().unwrap(); let field_tys = self.db.field_types(variant); |
