@@ -48,7 +48,7 @@ pub fn resolve<'tcx>(
48
48
49
49
values. values . iter_mut ( ) . for_each ( |v| match * v {
50
50
VarValue :: Value ( ref mut r) => * r = re_erased,
51
- VarValue :: ErrorValue ( _ ) => { }
51
+ VarValue :: ErrorValue => { }
52
52
} ) ;
53
53
( values, errors)
54
54
}
@@ -69,7 +69,7 @@ pub struct LexicalRegionResolutions<'tcx> {
69
69
#[ derive( Copy , Clone , Debug ) ]
70
70
enum VarValue < ' tcx > {
71
71
Value ( Region < ' tcx > ) ,
72
- ErrorValue ( RegionVid ) ,
72
+ ErrorValue ,
73
73
}
74
74
75
75
#[ derive( Clone , Debug ) ]
@@ -233,7 +233,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
233
233
( None , a_region, b_vid, b_data)
234
234
}
235
235
Constraint :: VarSubVar ( a_vid, b_vid) => match * var_values. value ( a_vid) {
236
- VarValue :: ErrorValue ( _ ) => continue ,
236
+ VarValue :: ErrorValue => continue ,
237
237
VarValue :: Value ( a_region) => {
238
238
let b_data = var_values. value_mut ( b_vid) ;
239
239
( Some ( a_vid) , a_region, b_vid, b_data)
@@ -250,7 +250,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
250
250
}
251
251
if let Some ( a_vid) = a_vid {
252
252
match * b_data {
253
- VarValue :: Value ( ReStatic ) | VarValue :: ErrorValue ( _ ) => ( ) ,
253
+ VarValue :: Value ( ReStatic ) | VarValue :: ErrorValue => ( ) ,
254
254
_ => {
255
255
constraints[ a_vid] . push ( ( a_vid, b_vid) ) ;
256
256
constraints[ b_vid] . push ( ( a_vid, b_vid) ) ;
@@ -262,14 +262,14 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
262
262
while let Some ( vid) = changes. pop ( ) {
263
263
constraints[ vid] . retain ( |& ( a_vid, b_vid) | {
264
264
let a_region = match * var_values. value ( a_vid) {
265
- VarValue :: ErrorValue ( _ ) => return false ,
265
+ VarValue :: ErrorValue => return false ,
266
266
VarValue :: Value ( a_region) => a_region,
267
267
} ;
268
268
let b_data = var_values. value_mut ( b_vid) ;
269
269
if self . expand_node ( a_region, b_vid, b_data) {
270
270
changes. push ( b_vid) ;
271
271
}
272
- !matches ! ( b_data, VarValue :: Value ( ReStatic ) | VarValue :: ErrorValue ( _ ) )
272
+ !matches ! ( b_data, VarValue :: Value ( ReStatic ) | VarValue :: ErrorValue )
273
273
} ) ;
274
274
}
275
275
}
@@ -332,7 +332,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
332
332
true
333
333
}
334
334
335
- VarValue :: ErrorValue ( _ ) => false ,
335
+ VarValue :: ErrorValue => false ,
336
336
}
337
337
}
338
338
@@ -476,7 +476,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
476
476
debug ! ( "contraction: {:?} == {:?}, {:?}" , a_vid, a_data, b_region) ;
477
477
478
478
let a_region = match * a_data {
479
- VarValue :: ErrorValue ( _ ) => continue ,
479
+ VarValue :: ErrorValue => continue ,
480
480
VarValue :: Value ( a_region) => a_region,
481
481
} ;
482
482
@@ -489,7 +489,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
489
489
cannot verify that {:?}={:?} <= {:?}",
490
490
origin, a_vid, a_region, b_region
491
491
) ;
492
- * a_data = VarValue :: ErrorValue ( a_vid ) ;
492
+ * a_data = VarValue :: ErrorValue ;
493
493
}
494
494
}
495
495
}
@@ -545,7 +545,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
545
545
for ( node_vid, value) in var_data. values . iter_enumerated ( ) {
546
546
match * value {
547
547
VarValue :: Value ( _) => { /* Inference successful */ }
548
- VarValue :: ErrorValue ( reg ) => {
548
+ VarValue :: ErrorValue => {
549
549
// Inference impossible: this value contains
550
550
// inconsistent constraints.
551
551
//
@@ -581,7 +581,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
581
581
(
582
582
Constraint :: VarSubVar ( _, sup) ,
583
583
SubregionOrigin :: DataBorrowed ( _, sp) ,
584
- ) if sup == & reg => Some ( * sp) ,
584
+ ) if sup == & node_vid => Some ( * sp) ,
585
585
_ => None ,
586
586
} )
587
587
. collect ( ) ;
@@ -900,7 +900,7 @@ impl<'tcx> LexicalRegionResolutions<'tcx> {
900
900
pub fn resolve_var ( & self , rid : RegionVid ) -> ty:: Region < ' tcx > {
901
901
let result = match self . values [ rid] {
902
902
VarValue :: Value ( r) => r,
903
- VarValue :: ErrorValue ( _ ) => self . error_region ,
903
+ VarValue :: ErrorValue => self . error_region ,
904
904
} ;
905
905
debug ! ( "resolve_var({:?}) = {:?}" , rid, result) ;
906
906
result
0 commit comments