@@ -32,8 +32,11 @@ impl<'tcx> Cx<'tcx> {
3232
3333 pub ( super ) fn mirror_expr_inner ( & mut self , hir_expr : & ' tcx hir:: Expr < ' tcx > ) -> ExprId {
3434 let temp_lifetime = self . region_scope_tree . temporary_scope ( hir_expr. hir_id . local_id , false ) ;
35- let expr_scope =
36- region:: Scope { id : hir_expr. hir_id . local_id , data : region:: ScopeData :: Node , for_stmt : false } ;
35+ let expr_scope = region:: Scope {
36+ id : hir_expr. hir_id . local_id ,
37+ data : region:: ScopeData :: Node ,
38+ for_stmt : false ,
39+ } ;
3740
3841 debug ! ( "Expr::make_mirror(): id={}, span={:?}" , hir_expr. hir_id, hir_expr. span) ;
3942
@@ -498,8 +501,9 @@ impl<'tcx> Cx<'tcx> {
498501 expr. kind
499502 ) ,
500503 } ;
501- let temp_lifetime =
502- self . region_scope_tree . temporary_scope ( expr. hir_id . local_id , false ) ;
504+ let temp_lifetime = self
505+ . region_scope_tree
506+ . temporary_scope ( expr. hir_id . local_id , false ) ;
503507 let res = self . typeck_results ( ) . qpath_res ( qpath, expr. hir_id ) ;
504508 let ty;
505509 match res {
@@ -579,14 +583,22 @@ impl<'tcx> Cx<'tcx> {
579583 }
580584 hir:: ExprKind :: Break ( dest, ref value) => match dest. target_id {
581585 Ok ( target_id) => ExprKind :: Break {
582- label : region:: Scope { id : target_id. local_id , data : region:: ScopeData :: Node , for_stmt : false , } ,
586+ label : region:: Scope {
587+ id : target_id. local_id ,
588+ data : region:: ScopeData :: Node ,
589+ for_stmt : false ,
590+ } ,
583591 value : value. as_ref ( ) . map ( |value| self . mirror_expr ( value) ) ,
584592 } ,
585593 Err ( err) => bug ! ( "invalid loop id for break: {}" , err) ,
586594 } ,
587595 hir:: ExprKind :: Continue ( dest) => match dest. target_id {
588596 Ok ( loop_id) => ExprKind :: Continue {
589- label : region:: Scope { id : loop_id. local_id , data : region:: ScopeData :: Node , for_stmt : false , } ,
597+ label : region:: Scope {
598+ id : loop_id. local_id ,
599+ data : region:: ScopeData :: Node ,
600+ for_stmt : false ,
601+ } ,
590602 } ,
591603 Err ( err) => bug ! ( "invalid loop id for continue: {}" , err) ,
592604 } ,
@@ -601,7 +613,8 @@ impl<'tcx> Cx<'tcx> {
601613 } ,
602614 hir:: ExprKind :: Loop ( ref body, ..) => {
603615 let block_ty = self . typeck_results ( ) . node_type ( body. hir_id ) ;
604- let temp_lifetime = self . region_scope_tree . temporary_scope ( body. hir_id . local_id , false ) ;
616+ let temp_lifetime =
617+ self . region_scope_tree . temporary_scope ( body. hir_id . local_id , false ) ;
605618 let block = self . mirror_block ( body) ;
606619 let body = self . thir . exprs . push ( Expr {
607620 ty : block_ty,
@@ -837,7 +850,11 @@ impl<'tcx> Cx<'tcx> {
837850 } ) ,
838851 body : self . mirror_expr ( arm. body ) ,
839852 lint_level : LintLevel :: Explicit ( arm. hir_id ) ,
840- scope : region:: Scope { id : arm. hir_id . local_id , data : region:: ScopeData :: Node , for_stmt : false } ,
853+ scope : region:: Scope {
854+ id : arm. hir_id . local_id ,
855+ data : region:: ScopeData :: Node ,
856+ for_stmt : false ,
857+ } ,
841858 span : arm. span ,
842859 } ;
843860 self . thir . arms . push ( arm)
@@ -922,7 +939,8 @@ impl<'tcx> Cx<'tcx> {
922939 // a constant reference (or constant raw pointer for `static mut`) in MIR
923940 Res :: Def ( DefKind :: Static , id) => {
924941 let ty = self . tcx . static_ptr_ty ( id) ;
925- let temp_lifetime = self . region_scope_tree . temporary_scope ( expr. hir_id . local_id , false ) ;
942+ let temp_lifetime =
943+ self . region_scope_tree . temporary_scope ( expr. hir_id . local_id , false ) ;
926944 let kind = if self . tcx . is_thread_local_static ( id) {
927945 ExprKind :: ThreadLocalRef ( id)
928946 } else {
@@ -1026,7 +1044,8 @@ impl<'tcx> Cx<'tcx> {
10261044 closure_expr : & ' tcx hir:: Expr < ' tcx > ,
10271045 place : HirPlace < ' tcx > ,
10281046 ) -> Expr < ' tcx > {
1029- let temp_lifetime = self . region_scope_tree . temporary_scope ( closure_expr. hir_id . local_id , false ) ;
1047+ let temp_lifetime =
1048+ self . region_scope_tree . temporary_scope ( closure_expr. hir_id . local_id , false ) ;
10301049 let var_ty = place. base_ty ;
10311050
10321051 // The result of capture analysis in `rustc_typeck/check/upvar.rs`represents a captured path
@@ -1081,7 +1100,8 @@ impl<'tcx> Cx<'tcx> {
10811100 let upvar_capture = captured_place. info . capture_kind ;
10821101 let captured_place_expr =
10831102 self . convert_captured_hir_place ( closure_expr, captured_place. place . clone ( ) ) ;
1084- let temp_lifetime = self . region_scope_tree . temporary_scope ( closure_expr. hir_id . local_id , false ) ;
1103+ let temp_lifetime =
1104+ self . region_scope_tree . temporary_scope ( closure_expr. hir_id . local_id , false ) ;
10851105
10861106 match upvar_capture {
10871107 ty:: UpvarCapture :: ByValue ( _) => captured_place_expr,
0 commit comments