@@ -29,10 +29,10 @@ use std::ops::Deref;
2929/// Here, the function `foo()` and the closure passed to
3030/// `bar()` will each have their own `FnCtxt`, but they will
3131/// share the inherited fields.
32- pub struct Inherited < ' a , ' tcx > {
32+ pub struct Inherited < ' tcx > {
3333 pub ( super ) infcx : InferCtxt < ' tcx > ,
3434
35- pub ( super ) typeck_results : & ' a RefCell < ty:: TypeckResults < ' tcx > > ,
35+ pub ( super ) typeck_results : RefCell < ty:: TypeckResults < ' tcx > > ,
3636
3737 pub ( super ) locals : RefCell < HirIdMap < super :: LocalTy < ' tcx > > > ,
3838
@@ -70,7 +70,7 @@ pub struct Inherited<'a, 'tcx> {
7070 pub ( super ) diverging_type_vars : RefCell < FxHashSet < Ty < ' tcx > > > ,
7171}
7272
73- impl < ' a , ' tcx > Deref for Inherited < ' a , ' tcx > {
73+ impl < ' tcx > Deref for Inherited < ' tcx > {
7474 type Target = InferCtxt < ' tcx > ;
7575 fn deref ( & self ) -> & Self :: Target {
7676 & self . infcx
@@ -86,7 +86,7 @@ pub struct InheritedBuilder<'tcx> {
8686 typeck_results : RefCell < ty:: TypeckResults < ' tcx > > ,
8787}
8888
89- impl < ' tcx > Inherited < ' _ , ' tcx > {
89+ impl < ' tcx > Inherited < ' tcx > {
9090 pub fn build ( tcx : TyCtxt < ' tcx > , def_id : LocalDefId ) -> InheritedBuilder < ' tcx > {
9191 let hir_owner = tcx. hir ( ) . local_def_id_to_hir_id ( def_id) . owner ;
9292
@@ -124,20 +124,20 @@ impl<'tcx> Inherited<'_, 'tcx> {
124124}
125125
126126impl < ' tcx > InheritedBuilder < ' tcx > {
127- pub fn enter < F , R > ( & mut self , f : F ) -> R
127+ pub fn enter < F , R > ( mut self , f : F ) -> R
128128 where
129- F : for < ' a > FnOnce ( Inherited < ' a , ' tcx > ) -> R ,
129+ F : FnOnce ( & Inherited < ' tcx > ) -> R ,
130130 {
131131 let def_id = self . def_id ;
132- self . infcx . enter ( |infcx| f ( Inherited :: new ( infcx, def_id, & self . typeck_results ) ) )
132+ self . infcx . enter ( |infcx| f ( & Inherited :: new ( infcx, def_id, self . typeck_results ) ) )
133133 }
134134}
135135
136- impl < ' a , ' tcx > Inherited < ' a , ' tcx > {
136+ impl < ' tcx > Inherited < ' tcx > {
137137 fn new (
138138 infcx : InferCtxt < ' tcx > ,
139139 def_id : LocalDefId ,
140- typeck_results : & ' a RefCell < ty:: TypeckResults < ' tcx > > ,
140+ typeck_results : RefCell < ty:: TypeckResults < ' tcx > > ,
141141 ) -> Self {
142142 let tcx = infcx. tcx ;
143143 let body_id = tcx. hir ( ) . maybe_body_owned_by ( def_id) ;
0 commit comments