We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 312f382 commit a01efbcCopy full SHA for a01efbc
src/librustc_mir/interpret/place.rs
@@ -823,6 +823,8 @@ where
823
let src = match self.try_read_immediate(src)? {
824
Ok(src_val) => {
825
// Yay, we got a value that we can write directly.
826
+ // FIXME: Add a check to make sure that if `src` is indirect,
827
+ // it does not overlap with `dest`.
828
return self.write_immediate_no_validate(src_val, dest);
829
}
830
Err(mplace) => mplace,
@@ -836,7 +838,8 @@ where
836
838
self.memory.copy(
837
839
src_ptr, src_align,
840
dest_ptr, dest_align,
- dest.layout.size, false
841
+ dest.layout.size,
842
+ /*nonoverlapping*/ true,
843
)?;
844
845
Ok(())
0 commit comments