Skip to content

Commit bc06bb1

Browse files
authored
Remove last use of rustc_pat_analysis::Captures
It's not necessary anymore due to Rust 2024 lifetime capture rules.
1 parent 2a66a5b commit bc06bb1

File tree

1 file changed

+5
-5
lines changed
  • src/tools/rust-analyzer/crates/hir-ty/src/diagnostics/match_check

1 file changed

+5
-5
lines changed

src/tools/rust-analyzer/crates/hir-ty/src/diagnostics/match_check/pat_analysis.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::fmt;
66
use hir_def::{DefWithBodyId, EnumId, EnumVariantId, HasModule, LocalFieldId, ModuleId, VariantId};
77
use intern::sym;
88
use rustc_pattern_analysis::{
9-
Captures, IndexVec, PatCx, PrivateUninhabitedField,
9+
IndexVec, PatCx, PrivateUninhabitedField,
1010
constructor::{Constructor, ConstructorSet, VariantVisibility},
1111
usefulness::{PlaceValidity, UsefulnessReport, compute_match_usefulness},
1212
};
@@ -138,11 +138,11 @@ impl<'db> MatchCheckCtx<'db> {
138138
}
139139

140140
// This lists the fields of a variant along with their types.
141-
fn list_variant_fields<'a>(
142-
&'a self,
143-
ty: &'a Ty,
141+
fn list_variant_fields(
142+
&self,
143+
ty: &Ty,
144144
variant: VariantId,
145-
) -> impl Iterator<Item = (LocalFieldId, Ty)> + Captures<'a> + Captures<'db> {
145+
) -> impl Iterator<Item = (LocalFieldId, Ty)> {
146146
let (_, substs) = ty.as_adt().unwrap();
147147

148148
let field_tys = self.db.field_types(variant);

0 commit comments

Comments
 (0)