@@ -76,7 +76,9 @@ fn mir_build(tcx: TyCtxt<'_>, def: ty::WithOptConstParam<LocalDefId>) -> Body<'_
7676 kind : hir:: TraitItemKind :: Const ( ty, Some ( body_id) ) ,
7777 ..
7878 } ) => ( * body_id, ty. span , None ) ,
79- Node :: AnonConst ( hir:: AnonConst { body, hir_id, .. } ) => ( * body, tcx. hir ( ) . span ( * hir_id) , None ) ,
79+ Node :: AnonConst ( hir:: AnonConst { body, hir_id, .. } ) => {
80+ ( * body, tcx. hir ( ) . span ( * hir_id) , None )
81+ }
8082
8183 _ => span_bug ! ( tcx. hir( ) . span( id) , "can't build MIR for {:?}" , def. did) ,
8284 } ;
@@ -184,7 +186,7 @@ fn mir_build(tcx: TyCtxt<'_>, def: ty::WithOptConstParam<LocalDefId>) -> Body<'_
184186 return_ty,
185187 return_ty_span,
186188 body,
187- span_with_body
189+ span_with_body,
188190 ) ;
189191 mir. yield_ty = yield_ty;
190192 mir
@@ -582,7 +584,7 @@ fn construct_fn<'a, 'tcx, A>(
582584 return_ty : Ty < ' tcx > ,
583585 return_ty_span : Span ,
584586 body : & ' tcx hir:: Body < ' tcx > ,
585- span_with_body : Span
587+ span_with_body : Span ,
586588) -> Body < ' tcx >
587589where
588590 A : Iterator < Item = ArgInfo < ' tcx > > ,
@@ -658,7 +660,8 @@ fn construct_const<'a, 'tcx>(
658660 let owner_id = tcx. hir ( ) . body_owner ( body_id) ;
659661 let def_id = tcx. hir ( ) . local_def_id ( owner_id) ;
660662 let span = tcx. hir ( ) . span ( owner_id) ;
661- let mut builder = Builder :: new ( hir, def_id. to_def_id ( ) , span, 0 , Safety :: Safe , const_ty, const_ty_span, None ) ;
663+ let mut builder =
664+ Builder :: new ( hir, def_id. to_def_id ( ) , span, 0 , Safety :: Safe , const_ty, const_ty_span, None ) ;
662665
663666 let mut block = START_BLOCK ;
664667 let ast_expr = & tcx. hir ( ) . body ( body_id) . value ;
@@ -698,7 +701,8 @@ fn construct_error<'a, 'tcx>(hir: Cx<'a, 'tcx>, body_id: hir::BodyId) -> Body<'t
698701 hir:: BodyOwnerKind :: Const => 0 ,
699702 hir:: BodyOwnerKind :: Static ( _) => 0 ,
700703 } ;
701- let mut builder = Builder :: new ( hir, def_id. to_def_id ( ) , span, num_params, Safety :: Safe , ty, span, None ) ;
704+ let mut builder =
705+ Builder :: new ( hir, def_id. to_def_id ( ) , span, num_params, Safety :: Safe , ty, span, None ) ;
702706 let source_info = builder. source_info ( span) ;
703707 // Some MIR passes will expect the number of parameters to match the
704708 // function declaration.
0 commit comments