@@ -131,7 +131,7 @@ impl<'tcx> MirPass<'tcx> for EarlyOtherwiseBranch {
131131 Operand :: Copy ( x) => Operand :: Copy ( * x) ,
132132 Operand :: Constant ( x) => Operand :: Constant ( x. clone ( ) ) ,
133133 } ;
134- let parent_ty = parent_op. ty ( body. local_decls ( ) , tcx) ;
134+ let parent_ty = parent_op. ty ( body, tcx) ;
135135 let statements_before = bbs[ parent] . statements . len ( ) ;
136136 let parent_end = Location { block : parent, statement_index : statements_before } ;
137137
@@ -268,7 +268,7 @@ fn may_hoist<'tcx>(tcx: TyCtxt<'tcx>, body: &Body<'tcx>, place: Place<'tcx>) ->
268268 // `otherwise` branch in `BBC, BBD` in the input to our transformation, which would
269269 // have invalidated the data when computing `discriminant(P)`
270270 // So dereferencing here is correct.
271- ProjectionElem :: Deref => match place. ty ( body. local_decls ( ) , tcx) . ty . kind ( ) {
271+ ProjectionElem :: Deref => match place. ty ( body, tcx) . ty . kind ( ) {
272272 ty:: Ref ( ..) => { }
273273 _ => return false ,
274274 } ,
@@ -317,7 +317,7 @@ fn evaluate_candidate<'tcx>(
317317 } = & bbs[ parent] . terminator ( ) . kind else {
318318 return None
319319 } ;
320- let parent_ty = parent_discr. ty ( body. local_decls ( ) , tcx) ;
320+ let parent_ty = parent_discr. ty ( body, tcx) ;
321321 let parent_dest = {
322322 let poss = targets. otherwise ( ) ;
323323 // If the fallthrough on the parent is trivially unreachable, we can let the
@@ -338,7 +338,7 @@ fn evaluate_candidate<'tcx>(
338338 } = & child_terminator. kind else {
339339 return None
340340 } ;
341- let child_ty = child_discr. ty ( body. local_decls ( ) , tcx) ;
341+ let child_ty = child_discr. ty ( body, tcx) ;
342342 if child_ty != parent_ty {
343343 return None ;
344344 }
0 commit comments