mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-27 18:26:19 +00:00
Greatly simplify lifetime captures in edition 2024
This commit is contained in:
parent
986b8f29da
commit
fb3a49ed55
1 changed files with 5 additions and 5 deletions
|
|
@ -361,11 +361,11 @@ impl PatCx for MatchCheckCtx<'_> {
|
|||
}
|
||||
}
|
||||
|
||||
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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue