@@ -322,23 +322,22 @@ pub(crate) fn codegen_fn_prelude<'tcx>(fx: &mut FunctionCx<'_, '_, 'tcx>, start_
322322 // not mutated by the current function, this is necessary to support unsized arguments.
323323 if let ArgKind :: Normal ( Some ( ArgValue { value : val, is_underaligned_pointee : false } ) ) =
324324 arg_kind
325+ && let Some ( ( addr, meta) ) = val. try_to_ptr ( )
325326 {
326- if let Some ( ( addr, meta) ) = val. try_to_ptr ( ) {
327- // Ownership of the value at the backing storage for an argument is passed to the
328- // callee per the ABI, so it is fine to borrow the backing storage of this argument
329- // to prevent a copy.
327+ // Ownership of the value at the backing storage for an argument is passed to the
328+ // callee per the ABI, so it is fine to borrow the backing storage of this argument
329+ // to prevent a copy.
330330
331- let place = if let Some ( meta) = meta {
332- CPlace :: for_ptr_with_extra ( addr, meta, val. layout ( ) )
333- } else {
334- CPlace :: for_ptr ( addr, val. layout ( ) )
335- } ;
331+ let place = if let Some ( meta) = meta {
332+ CPlace :: for_ptr_with_extra ( addr, meta, val. layout ( ) )
333+ } else {
334+ CPlace :: for_ptr ( addr, val. layout ( ) )
335+ } ;
336336
337- self :: comments:: add_local_place_comments ( fx, place, local) ;
337+ self :: comments:: add_local_place_comments ( fx, place, local) ;
338338
339- assert_eq ! ( fx. local_map. push( place) , local) ;
340- continue ;
341- }
339+ assert_eq ! ( fx. local_map. push( place) , local) ;
340+ continue ;
342341 }
343342
344343 let layout = fx. layout_of ( ty) ;
0 commit comments