@@ -8,9 +8,7 @@ use rustc_errors::{Applicability, Diag, EmissionGuarantee, MultiSpan, listify};
88use rustc_hir:: def:: { CtorKind , Namespace } ;
99use rustc_hir:: { self as hir, CoroutineKind , LangItem } ;
1010use rustc_index:: IndexSlice ;
11- use rustc_infer:: infer:: {
12- BoundRegionConversionTime , NllRegionVariableOrigin , RegionVariableOrigin ,
13- } ;
11+ use rustc_infer:: infer:: { BoundRegionConversionTime , NllRegionVariableOrigin } ;
1412use rustc_infer:: traits:: SelectionError ;
1513use rustc_middle:: bug;
1614use rustc_middle:: mir:: {
@@ -587,7 +585,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
587585 // this by hooking into the pretty printer and telling it to label the
588586 // lifetimes without names with the value `'0`.
589587 if let ty:: Ref ( region, ..) = ty. kind ( ) {
590- match * * region {
588+ match region. kind ( ) {
591589 ty:: ReBound ( _, ty:: BoundRegion { kind : br, .. } )
592590 | ty:: RePlaceholder ( ty:: PlaceholderRegion {
593591 bound : ty:: BoundRegion { kind : br, .. } ,
@@ -607,7 +605,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
607605 let mut printer = ty:: print:: FmtPrinter :: new ( self . infcx . tcx , Namespace :: TypeNS ) ;
608606
609607 let region = if let ty:: Ref ( region, ..) = ty. kind ( ) {
610- match * * region {
608+ match region. kind ( ) {
611609 ty:: ReBound ( _, ty:: BoundRegion { kind : br, .. } )
612610 | ty:: RePlaceholder ( ty:: PlaceholderRegion {
613611 bound : ty:: BoundRegion { kind : br, .. } ,
@@ -633,9 +631,8 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
633631 ) {
634632 let predicate_span = path. iter ( ) . find_map ( |constraint| {
635633 let outlived = constraint. sub ;
636- if let Some ( origin) = self . regioncx . var_infos . get ( outlived)
637- && let RegionVariableOrigin :: Nll ( NllRegionVariableOrigin :: Placeholder ( _) ) =
638- origin. origin
634+ if let Some ( origin) = self . regioncx . definitions . get ( outlived)
635+ && let NllRegionVariableOrigin :: Placeholder ( _) = origin. origin
639636 && let ConstraintCategory :: Predicate ( span) = constraint. category
640637 {
641638 Some ( span)
0 commit comments