diff --git a/src/constant.rs b/src/constant.rs index 31278f810e91..b23fef6af2dc 100644 --- a/src/constant.rs +++ b/src/constant.rs @@ -149,6 +149,8 @@ pub(crate) fn codegen_const_value<'tcx>( _ => unreachable!(), }; + // FIXME avoid this extra copy to the stack and directly write to the final + // destination let place = CPlace::new_stack_slot(fx, layout); place.to_ptr().store(fx, val, MemFlags::trusted()); place.to_cvalue(fx)