Split a bool argument into two named functions
This commit is contained in:
parent
ca109af2ac
commit
fc9d1a8133
12 changed files with 39 additions and 30 deletions
|
@ -153,7 +153,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
|||
);
|
||||
}
|
||||
|
||||
self.copy_op(src, dest, /*allow_transmute*/ true)?;
|
||||
self.copy_op_allow_transmute(src, dest)?;
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
|
@ -441,7 +441,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
|||
if src_field.layout.is_1zst() && cast_ty_field.is_1zst() {
|
||||
// Skip 1-ZST fields.
|
||||
} else if src_field.layout.ty == cast_ty_field.ty {
|
||||
self.copy_op(&src_field, &dst_field, /*allow_transmute*/ false)?;
|
||||
self.copy_op(&src_field, &dst_field)?;
|
||||
} else {
|
||||
if found_cast_field {
|
||||
span_bug!(self.cur_span(), "unsize_into: more than one field to cast");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue