Skip to content

Commit 01da14b

Browse files
committed
Fix references links
There are Duplicate link references in the article and the format is incorrect.
1 parent d27bdaf commit 01da14b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/doc/book/primitive-types.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,10 @@ and a length.
171171
## Slicing syntax
172172

173173
You can use a combo of `&` and `[]` to create a slice from various things. The
174-
`&` indicates that slices are similar to [references], which we will cover in
174+
`&` indicates that slices are similar to [references][references], which we will cover in
175175
detail later in this section. The `[]`s, with a range, let you define the
176176
length of the slice:
177177

178-
[references]: references-and-borrowing.html
179-
180178
```rust
181179
let a = [0, 1, 2, 3, 4];
182180
let complete = &a[..]; // A slice containing all of the elements in a
@@ -198,7 +196,7 @@ documentation][slice].
198196
Rust’s `str` type is the most primitive string type. As an [unsized type][dst],
199197
it’s not very useful by itself, but becomes useful when placed behind a
200198
reference, like `&str`. We'll elaborate further when we cover
201-
[Strings][strings] and [references].
199+
[Strings][strings] and [references][references].
202200

203201
[dst]: unsized-types.html
204202
[strings]: strings.html

0 commit comments

Comments
 (0)