@@ -120,7 +120,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
120120
121121 let src = self . eval_operand ( src, None ) ?;
122122 let dst = self . eval_operand ( dst, None ) ?;
123- self . copy_nonoverlapping ( src, dst, count) ?;
123+ self . copy ( & src, & dst, & count, /* nonoverlapping */ true ) ?;
124124 }
125125
126126 // Statements we do not track.
@@ -150,11 +150,12 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
150150 Ok ( ( ) )
151151 }
152152
153- pub ( crate ) fn copy_nonoverlapping (
153+ pub ( crate ) fn copy (
154154 & 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 ,
158159 ) -> InterpResult < ' tcx > {
159160 let count = self . read_scalar ( & count) ?. to_machine_usize ( self ) ?;
160161 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> {
170171 } ) ?;
171172
172173 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) ?;
174175 }
175176 Ok ( ( ) )
176177 }
0 commit comments