From 3557e6941dd99f22fd0ff9d2685d3807e92d17a5 Mon Sep 17 00:00:00 2001 From: "Michael F. Lamb" Date: Wed, 6 Jan 2016 16:02:03 -0800 Subject: [PATCH] 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. --- src/doc/book/primitive-types.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/doc/book/primitive-types.md b/src/doc/book/primitive-types.md index a8c7a7d4157..43b7e67e038 100644 --- a/src/doc/book/primitive-types.md +++ b/src/doc/book/primitive-types.md @@ -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]; -- 2.44.0