@@ -30,19 +30,20 @@ pub(crate) use self::check_match::check_match;
3030use self :: migration:: PatMigration ;
3131use crate :: errors:: * ;
3232
33- struct PatCtxt < ' a , ' tcx > {
33+ /// Context for lowering HIR patterns to THIR patterns.
34+ struct PatCtxt < ' tcx > {
3435 tcx : TyCtxt < ' tcx > ,
3536 typing_env : ty:: TypingEnv < ' tcx > ,
36- typeck_results : & ' a ty:: TypeckResults < ' tcx > ,
37+ typeck_results : & ' tcx ty:: TypeckResults < ' tcx > ,
3738
3839 /// Used by the Rust 2024 migration lint.
39- rust_2024_migration : Option < PatMigration < ' a > > ,
40+ rust_2024_migration : Option < PatMigration < ' tcx > > ,
4041}
4142
42- pub ( super ) fn pat_from_hir < ' a , ' tcx > (
43+ pub ( super ) fn pat_from_hir < ' tcx > (
4344 tcx : TyCtxt < ' tcx > ,
4445 typing_env : ty:: TypingEnv < ' tcx > ,
45- typeck_results : & ' a ty:: TypeckResults < ' tcx > ,
46+ typeck_results : & ' tcx ty:: TypeckResults < ' tcx > ,
4647 pat : & ' tcx hir:: Pat < ' tcx > ,
4748) -> Box < Pat < ' tcx > > {
4849 let mut pcx = PatCtxt {
@@ -62,7 +63,7 @@ pub(super) fn pat_from_hir<'a, 'tcx>(
6263 result
6364}
6465
65- impl < ' a , ' tcx > PatCtxt < ' a , ' tcx > {
66+ impl < ' tcx > PatCtxt < ' tcx > {
6667 fn lower_pattern ( & mut self , pat : & ' tcx hir:: Pat < ' tcx > ) -> Box < Pat < ' tcx > > {
6768 let adjustments: & [ PatAdjustment < ' tcx > ] =
6869 self . typeck_results . pat_adjustments ( ) . get ( pat. hir_id ) . map_or ( & [ ] , |v| & * * v) ;
0 commit comments