@@ -48,7 +48,7 @@ pub fn resolve<'tcx>(
4848
4949 values. values . iter_mut ( ) . for_each ( |v| match * v {
5050 VarValue :: Value ( ref mut r) => * r = re_erased,
51- VarValue :: ErrorValue ( _ ) => { }
51+ VarValue :: ErrorValue => { }
5252 } ) ;
5353 ( values, errors)
5454 }
@@ -69,7 +69,7 @@ pub struct LexicalRegionResolutions<'tcx> {
6969#[ derive( Copy , Clone , Debug ) ]
7070enum VarValue < ' tcx > {
7171 Value ( Region < ' tcx > ) ,
72- ErrorValue ( RegionVid ) ,
72+ ErrorValue ,
7373}
7474
7575#[ derive( Clone , Debug ) ]
@@ -233,7 +233,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
233233 ( None , a_region, b_vid, b_data)
234234 }
235235 Constraint :: VarSubVar ( a_vid, b_vid) => match * var_values. value ( a_vid) {
236- VarValue :: ErrorValue ( _ ) => continue ,
236+ VarValue :: ErrorValue => continue ,
237237 VarValue :: Value ( a_region) => {
238238 let b_data = var_values. value_mut ( b_vid) ;
239239 ( Some ( a_vid) , a_region, b_vid, b_data)
@@ -250,7 +250,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
250250 }
251251 if let Some ( a_vid) = a_vid {
252252 match * b_data {
253- VarValue :: Value ( ReStatic ) | VarValue :: ErrorValue ( _ ) => ( ) ,
253+ VarValue :: Value ( ReStatic ) | VarValue :: ErrorValue => ( ) ,
254254 _ => {
255255 constraints[ a_vid] . push ( ( a_vid, b_vid) ) ;
256256 constraints[ b_vid] . push ( ( a_vid, b_vid) ) ;
@@ -262,14 +262,14 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
262262 while let Some ( vid) = changes. pop ( ) {
263263 constraints[ vid] . retain ( |& ( a_vid, b_vid) | {
264264 let a_region = match * var_values. value ( a_vid) {
265- VarValue :: ErrorValue ( _ ) => return false ,
265+ VarValue :: ErrorValue => return false ,
266266 VarValue :: Value ( a_region) => a_region,
267267 } ;
268268 let b_data = var_values. value_mut ( b_vid) ;
269269 if self . expand_node ( a_region, b_vid, b_data) {
270270 changes. push ( b_vid) ;
271271 }
272- !matches ! ( b_data, VarValue :: Value ( ReStatic ) | VarValue :: ErrorValue ( _ ) )
272+ !matches ! ( b_data, VarValue :: Value ( ReStatic ) | VarValue :: ErrorValue )
273273 } ) ;
274274 }
275275 }
@@ -332,7 +332,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
332332 true
333333 }
334334
335- VarValue :: ErrorValue ( _ ) => false ,
335+ VarValue :: ErrorValue => false ,
336336 }
337337 }
338338
@@ -476,7 +476,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
476476 debug ! ( "contraction: {:?} == {:?}, {:?}" , a_vid, a_data, b_region) ;
477477
478478 let a_region = match * a_data {
479- VarValue :: ErrorValue ( _ ) => continue ,
479+ VarValue :: ErrorValue => continue ,
480480 VarValue :: Value ( a_region) => a_region,
481481 } ;
482482
@@ -489,7 +489,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
489489 cannot verify that {:?}={:?} <= {:?}",
490490 origin, a_vid, a_region, b_region
491491 ) ;
492- * a_data = VarValue :: ErrorValue ( a_vid ) ;
492+ * a_data = VarValue :: ErrorValue ;
493493 }
494494 }
495495 }
@@ -545,7 +545,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
545545 for ( node_vid, value) in var_data. values . iter_enumerated ( ) {
546546 match * value {
547547 VarValue :: Value ( _) => { /* Inference successful */ }
548- VarValue :: ErrorValue ( reg ) => {
548+ VarValue :: ErrorValue => {
549549 // Inference impossible: this value contains
550550 // inconsistent constraints.
551551 //
@@ -581,7 +581,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
581581 (
582582 Constraint :: VarSubVar ( _, sup) ,
583583 SubregionOrigin :: DataBorrowed ( _, sp) ,
584- ) if sup == & reg => Some ( * sp) ,
584+ ) if sup == & node_vid => Some ( * sp) ,
585585 _ => None ,
586586 } )
587587 . collect ( ) ;
@@ -900,7 +900,7 @@ impl<'tcx> LexicalRegionResolutions<'tcx> {
900900 pub fn resolve_var ( & self , rid : RegionVid ) -> ty:: Region < ' tcx > {
901901 let result = match self . values [ rid] {
902902 VarValue :: Value ( r) => r,
903- VarValue :: ErrorValue ( _ ) => self . error_region ,
903+ VarValue :: ErrorValue => self . error_region ,
904904 } ;
905905 debug ! ( "resolve_var({:?}) = {:?}" , rid, result) ;
906906 result
0 commit comments