@@ -16,7 +16,7 @@ use rustc_data_structures::intern::Interned;
1616use rustc_index:: vec:: { Idx , IndexVec } ;
1717use rustc_middle:: ty:: fold:: TypeFoldable ;
1818use 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 } ;
2020use rustc_middle:: ty:: { ReLateBound , RePlaceholder , ReVar } ;
2121use rustc_middle:: ty:: { Region , RegionVid } ;
2222use rustc_span:: Span ;
@@ -261,13 +261,6 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
261261 cur_region
262262 }
263263
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-
271264 RePlaceholder ( placeholder) => {
272265 // If the empty and placeholder regions are in the same universe,
273266 // then the LUB is the Placeholder region (which is the cur_region).
@@ -399,13 +392,6 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
399392 a_region
400393 }
401394
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-
409395 RePlaceholder ( placeholder) => {
410396 // If this empty region is from a universe that can
411397 // name the placeholder, then the placeholder is
@@ -428,9 +414,6 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
428414 // check below for a common case, here purely as an
429415 // optimization.
430416 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- }
434417
435418 let mut lub = self . lub_concrete_regions ( a_region, cur_region) ;
436419 if lub == cur_region {
@@ -470,7 +453,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
470453 // they are associated with.
471454 a_ui. min ( b_ui) == b_ui
472455 }
473- ( VarValue :: Value ( a) , VarValue :: Empty ( b_ui ) ) => {
456+ ( VarValue :: Value ( a) , VarValue :: Empty ( _ ) ) => {
474457 match * a {
475458 ReLateBound ( ..) | ReErased => {
476459 bug ! ( "cannot relate region: {:?}" , a) ;
@@ -493,12 +476,6 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
493476 false
494477 }
495478
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-
502479 RePlaceholder ( _) => {
503480 // The LUB is either `a` or `'static`
504481 false
@@ -526,12 +503,6 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
526503 true
527504 }
528505
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-
535506 RePlaceholder ( placeholder) => {
536507 // If this empty region is from a universe that can
537508 // name the placeholder, then the placeholder is
@@ -599,37 +570,6 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
599570 self . tcx ( ) . lifetimes . re_static
600571 }
601572
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-
633573 ( ReEarlyBound ( _) | ReFree ( _) , ReEarlyBound ( _) | ReFree ( _) ) => {
634574 self . region_rels . lub_free_regions ( a, b)
635575 }
@@ -1088,9 +1028,9 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
10881028 ty:: ReVar ( rid) => match var_values. values [ rid] {
10891029 VarValue :: ErrorValue => false ,
10901030 VarValue :: Empty ( _) => true ,
1091- VarValue :: Value ( min ) => matches ! ( * min , ty :: ReEmpty ( _ ) ) ,
1031+ VarValue :: Value ( _ ) => false ,
10921032 } ,
1093- _ => matches ! ( * min , ty :: ReEmpty ( _ ) ) ,
1033+ _ => false ,
10941034 } ,
10951035
10961036 VerifyBound :: AnyBound ( bs) => {
0 commit comments