@@ -124,20 +124,20 @@ struct ConstraintGraph<'a, 'gcx: 'a+'tcx, 'tcx: 'a> {
124124 graph_name : String ,
125125 region_rels : & ' a RegionRelations < ' a , ' gcx , ' tcx > ,
126126 map : & ' a FxHashMap < Constraint < ' tcx > , SubregionOrigin < ' tcx > > ,
127- node_ids : FxHashMap < Node < ' tcx > , usize > ,
127+ node_ids : FxHashMap < Node , usize > ,
128128}
129129
130130#[ derive( Clone , Hash , PartialEq , Eq , Debug , Copy ) ]
131- enum Node < ' tcx > {
131+ enum Node {
132132 RegionVid ( ty:: RegionVid ) ,
133- Region ( ty:: RegionKind < ' tcx > ) ,
133+ Region ( ty:: RegionKind ) ,
134134}
135135
136136// type Edge = Constraint;
137137#[ derive( Clone , PartialEq , Eq , Debug , Copy ) ]
138138enum Edge < ' tcx > {
139139 Constraint ( Constraint < ' tcx > ) ,
140- EnclScope ( CodeExtent < ' tcx > , CodeExtent < ' tcx > ) ,
140+ EnclScope ( CodeExtent , CodeExtent ) ,
141141}
142142
143143impl < ' a , ' gcx , ' tcx > ConstraintGraph < ' a , ' gcx , ' tcx > {
@@ -176,7 +176,7 @@ impl<'a, 'gcx, 'tcx> ConstraintGraph<'a, 'gcx, 'tcx> {
176176}
177177
178178impl < ' a , ' gcx , ' tcx > dot:: Labeller < ' a > for ConstraintGraph < ' a , ' gcx , ' tcx > {
179- type Node = Node < ' tcx > ;
179+ type Node = Node ;
180180 type Edge = Edge < ' tcx > ;
181181 fn graph_id ( & self ) -> dot:: Id {
182182 dot:: Id :: new ( & * self . graph_name ) . unwrap ( )
@@ -209,7 +209,7 @@ impl<'a, 'gcx, 'tcx> dot::Labeller<'a> for ConstraintGraph<'a, 'gcx, 'tcx> {
209209 }
210210}
211211
212- fn constraint_to_nodes < ' tcx > ( c : & Constraint < ' tcx > ) -> ( Node < ' tcx > , Node < ' tcx > ) {
212+ fn constraint_to_nodes ( c : & Constraint ) -> ( Node , Node ) {
213213 match * c {
214214 Constraint :: ConstrainVarSubVar ( rv_1, rv_2) =>
215215 ( Node :: RegionVid ( rv_1) , Node :: RegionVid ( rv_2) ) ,
@@ -222,7 +222,7 @@ fn constraint_to_nodes<'tcx>(c: &Constraint<'tcx>) -> (Node<'tcx>, Node<'tcx>) {
222222 }
223223}
224224
225- fn edge_to_nodes < ' tcx > ( e : & Edge < ' tcx > ) -> ( Node < ' tcx > , Node < ' tcx > ) {
225+ fn edge_to_nodes ( e : & Edge ) -> ( Node , Node ) {
226226 match * e {
227227 Edge :: Constraint ( ref c) => constraint_to_nodes ( c) ,
228228 Edge :: EnclScope ( sub, sup) => {
@@ -233,9 +233,9 @@ fn edge_to_nodes<'tcx>(e: &Edge<'tcx>) -> (Node<'tcx>, Node<'tcx>) {
233233}
234234
235235impl < ' a , ' gcx , ' tcx > dot:: GraphWalk < ' a > for ConstraintGraph < ' a , ' gcx , ' tcx > {
236- type Node = Node < ' tcx > ;
236+ type Node = Node ;
237237 type Edge = Edge < ' tcx > ;
238- fn nodes ( & self ) -> dot:: Nodes < Node < ' tcx > > {
238+ fn nodes ( & self ) -> dot:: Nodes < Node > {
239239 let mut set = FxHashSet ( ) ;
240240 for node in self . node_ids . keys ( ) {
241241 set. insert ( * node) ;
@@ -250,12 +250,12 @@ impl<'a, 'gcx, 'tcx> dot::GraphWalk<'a> for ConstraintGraph<'a, 'gcx, 'tcx> {
250250 debug ! ( "region graph has {} edges" , v. len( ) ) ;
251251 Cow :: Owned ( v)
252252 }
253- fn source ( & self , edge : & Edge < ' tcx > ) -> Node < ' tcx > {
253+ fn source ( & self , edge : & Edge < ' tcx > ) -> Node {
254254 let ( n1, _) = edge_to_nodes ( edge) ;
255255 debug ! ( "edge {:?} has source {:?}" , edge, n1) ;
256256 n1
257257 }
258- fn target ( & self , edge : & Edge < ' tcx > ) -> Node < ' tcx > {
258+ fn target ( & self , edge : & Edge < ' tcx > ) -> Node {
259259 let ( _, n2) = edge_to_nodes ( edge) ;
260260 debug ! ( "edge {:?} has target {:?}" , edge, n2) ;
261261 n2
0 commit comments