Skip to content

Commit

Permalink
Fix rust-analyzer to stop unnecessarily using Captures for RPITIT
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Sep 18, 2024
1 parent e3d94be commit 8d11dbf
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,11 @@ impl<'db> PatCx for MatchCheckCtx<'db> {
}
}

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) {
Expand Down

0 comments on commit 8d11dbf

Please sign in to comment.