diff options
| author | Lukas Wirth <me@lukaswirth.dev> | 2025-06-30 05:32:04 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-30 05:32:04 +0000 |
| commit | 863d0b5d53ebd5aa2d3c2c415fff841741c3937c (patch) | |
| tree | 6d2269ec01d6ce342bd93e72006db145cf1659d0 | |
| parent | 2a66a5b7d54cab656722b25b2a2a0f1e2825ef4b (diff) | |
| parent | bc06bb193da786e11f42f10574024c46b0428663 (diff) | |
| download | rust-863d0b5d53ebd5aa2d3c2c415fff841741c3937c.tar.gz rust-863d0b5d53ebd5aa2d3c2c415fff841741c3937c.zip | |
Merge pull request #20124 from zachs18/patch-1
Remove last use of `rustc_pattern_analysis::Captures`
| -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); |
