@@ -120,7 +120,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
120
120
121
121
let src = self . eval_operand ( src, None ) ?;
122
122
let dst = self . eval_operand ( dst, None ) ?;
123
- self . copy_nonoverlapping ( src, dst, count) ?;
123
+ self . copy ( & src, & dst, & count, /* nonoverlapping */ true ) ?;
124
124
}
125
125
126
126
// Statements we do not track.
@@ -150,11 +150,12 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
150
150
Ok ( ( ) )
151
151
}
152
152
153
- pub ( crate ) fn copy_nonoverlapping (
153
+ pub ( crate ) fn copy (
154
154
& mut self ,
155
- src : OpTy < ' tcx , <M as Machine < ' mir , ' tcx > >:: PointerTag > ,
156
- dst : OpTy < ' tcx , <M as Machine < ' mir , ' tcx > >:: PointerTag > ,
157
- count : OpTy < ' tcx , <M as Machine < ' mir , ' tcx > >:: PointerTag > ,
155
+ src : & OpTy < ' tcx , <M as Machine < ' mir , ' tcx > >:: PointerTag > ,
156
+ dst : & OpTy < ' tcx , <M as Machine < ' mir , ' tcx > >:: PointerTag > ,
157
+ count : & OpTy < ' tcx , <M as Machine < ' mir , ' tcx > >:: PointerTag > ,
158
+ nonoverlapping : bool ,
158
159
) -> InterpResult < ' tcx > {
159
160
let count = self . read_scalar ( & count) ?. to_machine_usize ( self ) ?;
160
161
let layout = self . layout_of ( src. layout . ty . builtin_deref ( true ) . unwrap ( ) . ty ) ?;
@@ -170,7 +171,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
170
171
} ) ?;
171
172
172
173
if let ( Some ( src) , Some ( dst) ) = ( src, dst) {
173
- self . memory . copy ( src, dst, size, /* nonoverlapping*/ true ) ?;
174
+ self . memory . copy ( src, dst, size, nonoverlapping) ?;
174
175
}
175
176
Ok ( ( ) )
176
177
}
0 commit comments