Link to references section when they first appear

In a straight-through read of "Syntax and Semantics," the concept of a
"reference" is used here before it is explained. Mention that and link to
the section explaining references.
This commit is contained in:
Michael F. Lamb 2016-01-06 16:02:03 -08:00
parent e22ceea1a7
commit 3557e6941d
1 changed files with 5 additions and 2 deletions

View File

@ -167,8 +167,11 @@ variable binding. Slices have a defined length, can be mutable or immutable.
## Slicing syntax
You can use a combo of `&` and `[]` to create a slice from various things. The
`&` indicates that slices are similar to references, and the `[]`s, with a
range, let you define the length of the slice:
`&` indicates that slices are similar to [references][], which we will cover in
detail later in this section. The `[]`s, with a range, let you define the
length of the slice:
[references]: references-and-borrowing.html
```rust
let a = [0, 1, 2, 3, 4];