@@ -82,6 +82,7 @@ use rustc_hir::intravisit::{self, NestedVisitorMap, Visitor};
8282use rustc_hir:: PatKind ;
8383use rustc_infer:: infer:: outlives:: env:: OutlivesEnvironment ;
8484use rustc_infer:: infer:: { self , RegionObligation , RegionckMode } ;
85+ use rustc_middle:: hir:: place:: { PlaceBase , PlaceWithHirId } ;
8586use rustc_middle:: ty:: adjustment;
8687use rustc_middle:: ty:: { self , Ty } ;
8788use rustc_span:: Span ;
@@ -442,7 +443,7 @@ impl<'a, 'tcx> RegionCtxt<'a, 'tcx> {
442443 fn constrain_adjustments (
443444 & mut self ,
444445 expr : & hir:: Expr < ' _ > ,
445- ) -> mc:: McResult < mc :: PlaceWithHirId < ' tcx > > {
446+ ) -> mc:: McResult < PlaceWithHirId < ' tcx > > {
446447 debug ! ( "constrain_adjustments(expr={:?})" , expr) ;
447448
448449 let mut place = self . with_mc ( |mc| mc. cat_expr_unadjusted ( expr) ) ?;
@@ -483,10 +484,10 @@ impl<'a, 'tcx> RegionCtxt<'a, 'tcx> {
483484
484485 fn check_safety_of_rvalue_destructor_if_necessary (
485486 & mut self ,
486- place_with_id : & mc :: PlaceWithHirId < ' tcx > ,
487+ place_with_id : & PlaceWithHirId < ' tcx > ,
487488 span : Span ,
488489 ) {
489- if let mc :: PlaceBase :: Rvalue = place_with_id. place . base {
490+ if let PlaceBase :: Rvalue = place_with_id. place . base {
490491 if place_with_id. place . projections . is_empty ( ) {
491492 let typ = self . resolve_type ( place_with_id. place . ty ( ) ) ;
492493 let body_id = self . body_id ;
@@ -573,7 +574,7 @@ impl<'a, 'tcx> RegionCtxt<'a, 'tcx> {
573574
574575 /// Link lifetimes of any ref bindings in `root_pat` to the pointers found
575576 /// in the discriminant, if needed.
576- fn link_pattern ( & self , discr_cmt : mc :: PlaceWithHirId < ' tcx > , root_pat : & hir:: Pat < ' _ > ) {
577+ fn link_pattern ( & self , discr_cmt : PlaceWithHirId < ' tcx > , root_pat : & hir:: Pat < ' _ > ) {
577578 debug ! ( "link_pattern(discr_cmt={:?}, root_pat={:?})" , discr_cmt, root_pat) ;
578579 ignore_err ! ( self . with_mc( |mc| {
579580 mc. cat_pattern( discr_cmt, root_pat, |sub_cmt, hir:: Pat { kind, span, hir_id } | {
@@ -594,7 +595,7 @@ impl<'a, 'tcx> RegionCtxt<'a, 'tcx> {
594595 fn link_autoref (
595596 & self ,
596597 expr : & hir:: Expr < ' _ > ,
597- expr_cmt : & mc :: PlaceWithHirId < ' tcx > ,
598+ expr_cmt : & PlaceWithHirId < ' tcx > ,
598599 autoref : & adjustment:: AutoBorrow < ' tcx > ,
599600 ) {
600601 debug ! ( "link_autoref(autoref={:?}, expr_cmt={:?})" , autoref, expr_cmt) ;
@@ -615,7 +616,7 @@ impl<'a, 'tcx> RegionCtxt<'a, 'tcx> {
615616 span : Span ,
616617 id : hir:: HirId ,
617618 mutbl : hir:: Mutability ,
618- cmt_borrowed : & mc :: PlaceWithHirId < ' tcx > ,
619+ cmt_borrowed : & PlaceWithHirId < ' tcx > ,
619620 ) {
620621 debug ! (
621622 "link_region_from_node_type(id={:?}, mutbl={:?}, cmt_borrowed={:?})" ,
@@ -638,7 +639,7 @@ impl<'a, 'tcx> RegionCtxt<'a, 'tcx> {
638639 span : Span ,
639640 borrow_region : ty:: Region < ' tcx > ,
640641 borrow_kind : ty:: BorrowKind ,
641- borrow_place : & mc :: PlaceWithHirId < ' tcx > ,
642+ borrow_place : & PlaceWithHirId < ' tcx > ,
642643 ) {
643644 let origin = infer:: DataBorrowed ( borrow_place. place . ty ( ) , span) ;
644645 self . type_must_outlive ( origin, borrow_place. place . ty ( ) , borrow_region) ;
@@ -659,7 +660,7 @@ impl<'a, 'tcx> RegionCtxt<'a, 'tcx> {
659660 _ => assert ! ( pointer_ty. is_box( ) , "unexpected built-in deref type {}" , pointer_ty) ,
660661 }
661662 }
662- if let mc :: PlaceBase :: Upvar ( upvar_id) = borrow_place. place . base {
663+ if let PlaceBase :: Upvar ( upvar_id) = borrow_place. place . base {
663664 self . link_upvar_region ( span, borrow_region, upvar_id) ;
664665 }
665666 }
0 commit comments