Skip to content

Commit 001a401

Browse files
authored
Rollup merge of #137334 - compiler-errors:edition-2024-fresh-2, r=saethlin,traviscross
Greatly simplify lifetime captures in edition 2024 Remove most of the `+ Captures` and `+ '_` from the compiler, since they are now unnecessary with the new edition 2021 lifetime capture rules. Use some `+ 'tcx` and `+ 'static` rather than being overly verbose with precise capturing syntax.
2 parents ea923f9 + fb3a49e commit 001a401

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

crates/hir-ty/src/diagnostics/match_check/pat_analysis.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -361,11 +361,11 @@ impl PatCx for MatchCheckCtx<'_> {
361361
}
362362
}
363363

364-
fn ctor_sub_tys<'a>(
365-
&'a self,
366-
ctor: &'a rustc_pattern_analysis::constructor::Constructor<Self>,
367-
ty: &'a Self::Ty,
368-
) -> impl ExactSizeIterator<Item = (Self::Ty, PrivateUninhabitedField)> + Captures<'a> {
364+
fn ctor_sub_tys(
365+
&self,
366+
ctor: &rustc_pattern_analysis::constructor::Constructor<Self>,
367+
ty: &Self::Ty,
368+
) -> impl ExactSizeIterator<Item = (Self::Ty, PrivateUninhabitedField)> {
369369
let single = |ty| smallvec![(ty, PrivateUninhabitedField(false))];
370370
let tys: SmallVec<[_; 2]> = match ctor {
371371
Struct | Variant(_) | UnionField => match ty.kind(Interner) {

0 commit comments

Comments
 (0)