# langref: fix the slice_bounds.zig doctest · gitcafe/zig

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

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

Visibility: public

Requested revision: 1d5368fa35740f64d81f755588edc5c6698036ec

Requested commit: 1d5368fa35740f64d81f755588edc5c6698036ec

Commit: 1d5368fa35740f64d81f755588edc5c6698036ec

Tree: 504aa90c5fa89a66cf677ad9cb8bdcdb061b5ddc

Author: Manlio Perillo

Committer: Andrew Kelley

## Message

```
langref: fix the slice_bounds.zig doctest

In the slice_bounds.zig doctest, the code "const slice = array[2..4]" is
incorrect, since the actual type is a pointer to an array, instead of a
slice.

Use a runtime know value to slice the array.

```

## Parents

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

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