@@ -16,7 +16,7 @@ use rustc_data_structures::intern::Interned;
16
16
use rustc_index:: vec:: { Idx , IndexVec } ;
17
17
use rustc_middle:: ty:: fold:: TypeFoldable ;
18
18
use rustc_middle:: ty:: { self , Ty , TyCtxt } ;
19
- use rustc_middle:: ty:: { ReEarlyBound , ReEmpty , ReErased , ReFree , ReStatic } ;
19
+ use rustc_middle:: ty:: { ReEarlyBound , ReErased , ReFree , ReStatic } ;
20
20
use rustc_middle:: ty:: { ReLateBound , RePlaceholder , ReVar } ;
21
21
use rustc_middle:: ty:: { Region , RegionVid } ;
22
22
use rustc_span:: Span ;
@@ -261,13 +261,6 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
261
261
cur_region
262
262
}
263
263
264
- ReEmpty ( b_ui) => {
265
- // Empty regions are ordered according to the universe
266
- // they are associated with.
267
- let ui = a_universe. min ( b_ui) ;
268
- self . tcx ( ) . mk_region ( ReEmpty ( ui) )
269
- }
270
-
271
264
RePlaceholder ( placeholder) => {
272
265
// If the empty and placeholder regions are in the same universe,
273
266
// then the LUB is the Placeholder region (which is the cur_region).
@@ -399,13 +392,6 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
399
392
a_region
400
393
}
401
394
402
- ReEmpty ( a_ui) => {
403
- // Empty regions are ordered according to the universe
404
- // they are associated with.
405
- let ui = a_ui. min ( empty_ui) ;
406
- self . tcx ( ) . mk_region ( ReEmpty ( ui) )
407
- }
408
-
409
395
RePlaceholder ( placeholder) => {
410
396
// If this empty region is from a universe that can
411
397
// name the placeholder, then the placeholder is
@@ -428,9 +414,6 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
428
414
// check below for a common case, here purely as an
429
415
// optimization.
430
416
let b_universe = self . var_infos [ b_vid] . universe ;
431
- if let ReEmpty ( a_universe) = * a_region && a_universe == b_universe {
432
- return false ;
433
- }
434
417
435
418
let mut lub = self . lub_concrete_regions ( a_region, cur_region) ;
436
419
if lub == cur_region {
@@ -470,7 +453,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
470
453
// they are associated with.
471
454
a_ui. min ( b_ui) == b_ui
472
455
}
473
- ( VarValue :: Value ( a) , VarValue :: Empty ( b_ui ) ) => {
456
+ ( VarValue :: Value ( a) , VarValue :: Empty ( _ ) ) => {
474
457
match * a {
475
458
ReLateBound ( ..) | ReErased => {
476
459
bug ! ( "cannot relate region: {:?}" , a) ;
@@ -493,12 +476,6 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
493
476
false
494
477
}
495
478
496
- ReEmpty ( a_ui) => {
497
- // Empty regions are ordered according to the universe
498
- // they are associated with.
499
- a_ui. min ( b_ui) == b_ui
500
- }
501
-
502
479
RePlaceholder ( _) => {
503
480
// The LUB is either `a` or `'static`
504
481
false
@@ -526,12 +503,6 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
526
503
true
527
504
}
528
505
529
- ReEmpty ( b_ui) => {
530
- // Empty regions are ordered according to the universe
531
- // they are associated with.
532
- a_ui. min ( b_ui) == b_ui
533
- }
534
-
535
506
RePlaceholder ( placeholder) => {
536
507
// If this empty region is from a universe that can
537
508
// name the placeholder, then the placeholder is
@@ -599,37 +570,6 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
599
570
self . tcx ( ) . lifetimes . re_static
600
571
}
601
572
602
- ( ReEmpty ( _) , ReEarlyBound ( _) | ReFree ( _) ) => {
603
- // All empty regions are less than early-bound, free,
604
- // and scope regions.
605
- b
606
- }
607
-
608
- ( ReEarlyBound ( _) | ReFree ( _) , ReEmpty ( _) ) => {
609
- // All empty regions are less than early-bound, free,
610
- // and scope regions.
611
- a
612
- }
613
-
614
- ( ReEmpty ( a_ui) , ReEmpty ( b_ui) ) => {
615
- // Empty regions are ordered according to the universe
616
- // they are associated with.
617
- let ui = a_ui. min ( b_ui) ;
618
- self . tcx ( ) . mk_region ( ReEmpty ( ui) )
619
- }
620
-
621
- ( ReEmpty ( empty_ui) , RePlaceholder ( placeholder) )
622
- | ( RePlaceholder ( placeholder) , ReEmpty ( empty_ui) ) => {
623
- // If this empty region is from a universe that can
624
- // name the placeholder, then the placeholder is
625
- // larger; otherwise, the only ancestor is `'static`.
626
- if empty_ui. can_name ( placeholder. universe ) {
627
- self . tcx ( ) . mk_region ( RePlaceholder ( placeholder) )
628
- } else {
629
- self . tcx ( ) . lifetimes . re_static
630
- }
631
- }
632
-
633
573
( ReEarlyBound ( _) | ReFree ( _) , ReEarlyBound ( _) | ReFree ( _) ) => {
634
574
self . region_rels . lub_free_regions ( a, b)
635
575
}
@@ -1088,9 +1028,9 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
1088
1028
ty:: ReVar ( rid) => match var_values. values [ rid] {
1089
1029
VarValue :: ErrorValue => false ,
1090
1030
VarValue :: Empty ( _) => true ,
1091
- VarValue :: Value ( min ) => matches ! ( * min , ty :: ReEmpty ( _ ) ) ,
1031
+ VarValue :: Value ( _ ) => false ,
1092
1032
} ,
1093
- _ => matches ! ( * min , ty :: ReEmpty ( _ ) ) ,
1033
+ _ => false ,
1094
1034
} ,
1095
1035
1096
1036
VerifyBound :: AnyBound ( bs) => {
0 commit comments