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