# langref: update comments in the slices.zig doctest \(\#13819\) · gitcafe/zig

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

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

Visibility: public

Requested revision: 21dafd7a54f1b3233e0e73439daee82aa08d4900

Requested commit: 21dafd7a54f1b3233e0e73439daee82aa08d4900

Commit: 21dafd7a54f1b3233e0e73439daee82aa08d4900

Tree: 16a7199a0dd4c832ac907d488054b96639e6945f

Author: Manlio Perillo

Committer: GitHub

## Message

```
langref: update comments in the slices.zig doctest (#13819)

In the slices.zig doctest, the code
`const all_together_slice = all_together[0..]` is incorrect, since the
actual type is a pointer to an array, instead of a slice.

Use a runtime-known value to slice the array.

In the next "slice pointer" test, clarify that slicing a slice to
produce a pointer to an array, requires comptime-known indexes, not just
constant indexes.
```

## Parents

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

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