Split a bool argument into two named functions

This commit is contained in:
Oli Scherer
2024-01-03 12:05:48 +00:00
parent ca109af2ac
commit fc9d1a8133
12 changed files with 39 additions and 30 deletions

View File

@@ -481,7 +481,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
// FIXME: Depending on the PassMode, this should reset some padding to uninitialized. (This
// is true for all `copy_op`, but there are a lot of special cases for argument passing
// specifically.)
self.copy_op(&caller_arg_copy, &callee_arg, /*allow_transmute*/ true)?;
self.copy_op_allow_transmute(&caller_arg_copy, &callee_arg)?;
// If this was an in-place pass, protect the place it comes from for the duration of the call.
if let FnArg::InPlace(place) = caller_arg {
M::protect_in_place_function_argument(self, place)?;