# Make slice always return a reference · gitcafe/zig

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

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

Visibility: public

Requested revision: cfae70ec8e736af3fcd465c78bd80e160968eea8

Requested commit: cfae70ec8e736af3fcd465c78bd80e160968eea8

Commit: cfae70ec8e736af3fcd465c78bd80e160968eea8

Tree: 04e5925f0ee0d8485644f58ff0f99f492065c232

Author: Robin Voetter

Committer: Andrew Kelley

## Message

```
Make slice always return a reference

Previously this returned an rvalue, which leads to unexpected behaviour
when writing expressions such as `x[1..][1..].`

```

## Parents

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

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