# Sema: allow \`@ptrCast\` single-item pointer to slice · gitcafe/zig

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

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

Visibility: public

Requested revision: f2077f57ae03ef21f1bfee6e4e041c5f466fc3be

Requested commit: f2077f57ae03ef21f1bfee6e4e041c5f466fc3be

Commit: f2077f57ae03ef21f1bfee6e4e041c5f466fc3be

Tree: 9401d586e5fd757e1ac1805f0af7bd8fcaed77bf

Author: mlugg

Committer: Matthew Lugg

## Message

```
Sema: allow `@ptrCast` single-item pointer to slice

Also, rework this logic a little to make it simpler. The length of the
result slice is now computed in one place.

```

## Parents

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

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