# Sema: \`@memcpy\` changes · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/71d16106ad76bb31bc4e17dc37f8d8b5498a12dd)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 71d16106ad76bb31bc4e17dc37f8d8b5498a12dd

Requested commit: 71d16106ad76bb31bc4e17dc37f8d8b5498a12dd

Commit: 71d16106ad76bb31bc4e17dc37f8d8b5498a12dd

Tree: f8db4c1ed772e3188447afad05156dd6d1c664fc

Author: mlugg

Committer: Matthew Lugg

## Message

```
Sema: `@memcpy` changes

* The langspec definition of `@memcpy` has been changed so that the
  source and destination element types must be in-memory coercible,
  allowing all such calls to be raw copying operations, not actually
  applying any coercions.
* Implement aliasing check for comptime `@memcpy`; a compile error will
  now be emitted if the arguments alias.
* Implement more efficient comptime `@memcpy` by loading and storing a
  whole array at once, similar to how `@memset` is implemented.

```

## Parents

- [97ccf3504f0b4787b86fa882312aba01ab980121](https://git.cafe/gitcafe/zig/commit/97ccf3504f0b4787b86fa882312aba01ab980121?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/71d16106ad76bb31bc4e17dc37f8d8b5498a12dd?format=markdown)
