@@ -288,7 +288,7 @@ impl<'tcx> MirBorrowckCtxt<'_, '_, 'tcx> {
288288 let tcx = self . infcx . tcx ;
289289
290290 debug ! ( "give_region_a_name: error_region = {:?}" , error_region) ;
291- match * error_region {
291+ match error_region. kind ( ) {
292292 ty:: ReEarlyParam ( ebr) => ebr. has_name ( ) . then ( || {
293293 let def_id = tcx. generics_of ( self . mir_def_id ( ) ) . region_param ( ebr, tcx) . def_id ;
294294 let span = tcx. hir_span_if_local ( def_id) . unwrap_or ( DUMMY_SP ) ;
@@ -896,7 +896,7 @@ impl<'tcx> MirBorrowckCtxt<'_, '_, 'tcx> {
896896 & self ,
897897 fr : RegionVid ,
898898 ) -> Option < RegionName > {
899- let ty:: ReEarlyParam ( region) = * self . to_error_region ( fr) ? else {
899+ let ty:: ReEarlyParam ( region) = self . to_error_region ( fr) ?. kind ( ) else {
900900 return None ;
901901 } ;
902902 if region. has_name ( ) {
@@ -912,7 +912,7 @@ impl<'tcx> MirBorrowckCtxt<'_, '_, 'tcx> {
912912
913913 let found = tcx
914914 . any_free_region_meets ( & tcx. type_of ( region_parent) . instantiate_identity ( ) , |r| {
915- * r == ty:: ReEarlyParam ( region)
915+ r . kind ( ) == ty:: ReEarlyParam ( region)
916916 } ) ;
917917
918918 Some ( RegionName {
@@ -931,7 +931,7 @@ impl<'tcx> MirBorrowckCtxt<'_, '_, 'tcx> {
931931 & self ,
932932 fr : RegionVid ,
933933 ) -> Option < RegionName > {
934- let ty:: ReEarlyParam ( region) = * self . to_error_region ( fr) ? else {
934+ let ty:: ReEarlyParam ( region) = self . to_error_region ( fr) ?. kind ( ) else {
935935 return None ;
936936 } ;
937937 if region. has_name ( ) {
@@ -1007,7 +1007,7 @@ impl<'tcx> MirBorrowckCtxt<'_, '_, 'tcx> {
10071007 if data. projection_term . self_ty ( ) == ty => { }
10081008 _ => return false ,
10091009 }
1010- tcx. any_free_region_meets ( pred, |r| * r == ty:: ReEarlyParam ( region) )
1010+ tcx. any_free_region_meets ( pred, |r| r . kind ( ) == ty:: ReEarlyParam ( region) )
10111011 } )
10121012 } else {
10131013 false
0 commit comments