@@ -97,11 +97,11 @@ impl<D: ConstraintGraphDirection> ConstraintGraph<D> {
9797 /// Given the constraint set from which this graph was built
9898 /// creates a region graph so that you can iterate over *regions*
9999 /// and not constraints.
100- pub ( crate ) fn region_graph < ' rg , ' tcx > (
101- & ' rg self ,
102- set : & ' rg OutlivesConstraintSet < ' tcx > ,
100+ pub ( crate ) fn region_graph < ' a , ' tcx > (
101+ & ' a self ,
102+ set : & ' a OutlivesConstraintSet < ' tcx > ,
103103 static_region : RegionVid ,
104- ) -> RegionGraph < ' rg , ' tcx , D > {
104+ ) -> RegionGraph < ' a , ' tcx , D > {
105105 RegionGraph :: new ( set, self , static_region)
106106 }
107107
@@ -130,15 +130,15 @@ impl<D: ConstraintGraphDirection> ConstraintGraph<D> {
130130 }
131131}
132132
133- pub ( crate ) struct Edges < ' s , ' tcx , D : ConstraintGraphDirection > {
134- graph : & ' s ConstraintGraph < D > ,
135- constraints : & ' s OutlivesConstraintSet < ' tcx > ,
133+ pub ( crate ) struct Edges < ' a , ' tcx , D : ConstraintGraphDirection > {
134+ graph : & ' a ConstraintGraph < D > ,
135+ constraints : & ' a OutlivesConstraintSet < ' tcx > ,
136136 pointer : Option < OutlivesConstraintIndex > ,
137137 next_static_idx : Option < usize > ,
138138 static_region : RegionVid ,
139139}
140140
141- impl < ' s , ' tcx , D : ConstraintGraphDirection > Iterator for Edges < ' s , ' tcx , D > {
141+ impl < ' a , ' tcx , D : ConstraintGraphDirection > Iterator for Edges < ' a , ' tcx , D > {
142142 type Item = OutlivesConstraint < ' tcx > ;
143143
144144 fn next ( & mut self ) -> Option < Self :: Item > {
@@ -171,55 +171,55 @@ impl<'s, 'tcx, D: ConstraintGraphDirection> Iterator for Edges<'s, 'tcx, D> {
171171/// This struct brings together a constraint set and a (normal, not
172172/// reverse) constraint graph. It implements the graph traits and is
173173/// usd for doing the SCC computation.
174- pub ( crate ) struct RegionGraph < ' s , ' tcx , D : ConstraintGraphDirection > {
175- set : & ' s OutlivesConstraintSet < ' tcx > ,
176- constraint_graph : & ' s ConstraintGraph < D > ,
174+ pub ( crate ) struct RegionGraph < ' a , ' tcx , D : ConstraintGraphDirection > {
175+ set : & ' a OutlivesConstraintSet < ' tcx > ,
176+ constraint_graph : & ' a ConstraintGraph < D > ,
177177 static_region : RegionVid ,
178178}
179179
180- impl < ' s , ' tcx , D : ConstraintGraphDirection > RegionGraph < ' s , ' tcx , D > {
180+ impl < ' a , ' tcx , D : ConstraintGraphDirection > RegionGraph < ' a , ' tcx , D > {
181181 /// Creates a "dependency graph" where each region constraint `R1:
182182 /// R2` is treated as an edge `R1 -> R2`. We use this graph to
183183 /// construct SCCs for region inference but also for error
184184 /// reporting.
185185 pub ( crate ) fn new (
186- set : & ' s OutlivesConstraintSet < ' tcx > ,
187- constraint_graph : & ' s ConstraintGraph < D > ,
186+ set : & ' a OutlivesConstraintSet < ' tcx > ,
187+ constraint_graph : & ' a ConstraintGraph < D > ,
188188 static_region : RegionVid ,
189189 ) -> Self {
190190 Self { set, constraint_graph, static_region }
191191 }
192192
193193 /// Given a region `R`, iterate over all regions `R1` such that
194194 /// there exists a constraint `R: R1`.
195- pub ( crate ) fn outgoing_regions ( & self , region_sup : RegionVid ) -> Successors < ' s , ' tcx , D > {
195+ pub ( crate ) fn outgoing_regions ( & self , region_sup : RegionVid ) -> Successors < ' a , ' tcx , D > {
196196 Successors {
197197 edges : self . constraint_graph . outgoing_edges ( region_sup, self . set , self . static_region ) ,
198198 }
199199 }
200200}
201201
202- pub ( crate ) struct Successors < ' s , ' tcx , D : ConstraintGraphDirection > {
203- edges : Edges < ' s , ' tcx , D > ,
202+ pub ( crate ) struct Successors < ' a , ' tcx , D : ConstraintGraphDirection > {
203+ edges : Edges < ' a , ' tcx , D > ,
204204}
205205
206- impl < ' s , ' tcx , D : ConstraintGraphDirection > Iterator for Successors < ' s , ' tcx , D > {
206+ impl < ' a , ' tcx , D : ConstraintGraphDirection > Iterator for Successors < ' a , ' tcx , D > {
207207 type Item = RegionVid ;
208208
209209 fn next ( & mut self ) -> Option < Self :: Item > {
210210 self . edges . next ( ) . map ( |c| D :: end_region ( & c) )
211211 }
212212}
213213
214- impl < ' s , ' tcx , D : ConstraintGraphDirection > graph:: DirectedGraph for RegionGraph < ' s , ' tcx , D > {
214+ impl < ' a , ' tcx , D : ConstraintGraphDirection > graph:: DirectedGraph for RegionGraph < ' a , ' tcx , D > {
215215 type Node = RegionVid ;
216216
217217 fn num_nodes ( & self ) -> usize {
218218 self . constraint_graph . first_constraints . len ( )
219219 }
220220}
221221
222- impl < ' s , ' tcx , D : ConstraintGraphDirection > graph:: Successors for RegionGraph < ' s , ' tcx , D > {
222+ impl < ' a , ' tcx , D : ConstraintGraphDirection > graph:: Successors for RegionGraph < ' a , ' tcx , D > {
223223 fn successors ( & self , node : Self :: Node ) -> impl Iterator < Item = Self :: Node > {
224224 self . outgoing_regions ( node)
225225 }
0 commit comments