Skip to content

Commit fcf8ded

Browse files
committed
docs: anchors fixes
1 parent 5ff4442 commit fcf8ded

8 files changed

+21
-21
lines changed

src/doc/nomicon/lifetime-mismatch.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@ TODO: other common problems? SEME regions stuff, mostly?
7878

7979

8080

81-
[ex2]: lifetimes.html#example-2:-aliasing-a-mutable-reference
81+
[ex2]: lifetimes.html#example-aliasing-a-mutable-reference

src/doc/nomicon/repr-rust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,4 +151,4 @@ use fairly elaborate algorithms to cache bits throughout nested types with
151151
special constrained representations. As such it is *especially* desirable that
152152
we leave enum layout unspecified today.
153153

154-
[dst]: exotic-sizes.html#dynamically-sized-types-(dsts)
154+
[dst]: exotic-sizes.html#dynamically-sized-types-dsts

src/doc/reference.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1997,7 +1997,7 @@ On `struct`s:
19971997
list of names `#[macro_use(foo, bar)]` restricts the import to just those
19981998
macros named. The `extern crate` must appear at the crate root, not inside
19991999
`mod`, which ensures proper function of the [`$crate` macro
2000-
variable](book/macros.html#the-variable-$crate).
2000+
variable](book/macros.html#the-variable-crate).
20012001

20022002
- `macro_reexport` on an `extern crate` — re-export the named macros.
20032003

@@ -2007,7 +2007,7 @@ On `struct`s:
20072007
link it into the output.
20082008

20092009
See the [macros section of the
2010-
book](book/macros.html#scoping-and-macro-import/export) for more information on
2010+
book](book/macros.html#scoping-and-macro-importexport) for more information on
20112011
macro scope.
20122012

20132013

@@ -2586,7 +2586,7 @@ Here are some examples:
25862586
#### Moved and copied types
25872587

25882588
When a [local variable](#variables) is used as an
2589-
[rvalue](#lvalues,-rvalues-and-temporaries), the variable will be copied
2589+
[rvalue](#lvalues-rvalues-and-temporaries), the variable will be copied
25902590
if its type implements `Copy`. All others are moved.
25912591

25922592
### Literal expressions
@@ -2605,7 +2605,7 @@ value, or the unit value.
26052605
### Path expressions
26062606

26072607
A [path](#paths) used as an expression context denotes either a local variable
2608-
or an item. Path expressions are [lvalues](#lvalues,-rvalues-and-temporaries).
2608+
or an item. Path expressions are [lvalues](#lvalues-rvalues-and-temporaries).
26092609

26102610
### Tuple expressions
26112611

@@ -2718,7 +2718,7 @@ foo().x;
27182718
(Struct {a: 10, b: 20}).a;
27192719
```
27202720

2721-
A field access is an [lvalue](#lvalues,-rvalues-and-temporaries) referring to
2721+
A field access is an [lvalue](#lvalues-rvalues-and-temporaries) referring to
27222722
the value of that field. When the type providing the field inherits mutability,
27232723
it can be [assigned](#assignment-expressions) to.
27242724

@@ -2729,7 +2729,7 @@ fewer autoderefs to more.
27292729

27302730
### Array expressions
27312731

2732-
An [array](#array,-and-slice-types) _expression_ is written by enclosing zero
2732+
An [array](#array-and-slice-types) _expression_ is written by enclosing zero
27332733
or more comma-separated expressions of uniform type in square brackets.
27342734

27352735
In the `[expr ';' expr]` form, the expression after the `';'` must be a
@@ -2745,9 +2745,9 @@ constant expression that can be evaluated at compile time, such as a
27452745

27462746
### Index expressions
27472747

2748-
[Array](#array,-and-slice-types)-typed expressions can be indexed by
2748+
[Array](#array-and-slice-types)-typed expressions can be indexed by
27492749
writing a square-bracket-enclosed expression (the index) after them. When the
2750-
array is mutable, the resulting [lvalue](#lvalues,-rvalues-and-temporaries) can
2750+
array is mutable, the resulting [lvalue](#lvalues-rvalues-and-temporaries) can
27512751
be assigned to.
27522752

27532753
Indices are zero-based, and may be of any integral type. Vector access is
@@ -2801,7 +2801,7 @@ before the expression they apply to.
28012801
* `*`
28022802
: Dereference. When applied to a [pointer](#pointer-types) it denotes the
28032803
pointed-to location. For pointers to mutable locations, the resulting
2804-
[lvalue](#lvalues,-rvalues-and-temporaries) can be assigned to.
2804+
[lvalue](#lvalues-rvalues-and-temporaries) can be assigned to.
28052805
On non-pointer types, it calls the `deref` method of the `std::ops::Deref`
28062806
trait, or the `deref_mut` method of the `std::ops::DerefMut` trait (if
28072807
implemented by the type and required for an outer expression that will or
@@ -2942,8 +2942,8 @@ surprising side-effects on the dynamic execution semantics.
29422942
#### Assignment expressions
29432943

29442944
An _assignment expression_ consists of an
2945-
[lvalue](#lvalues,-rvalues-and-temporaries) expression followed by an equals
2946-
sign (`=`) and an [rvalue](#lvalues,-rvalues-and-temporaries) expression.
2945+
[lvalue](#lvalues-rvalues-and-temporaries) expression followed by an equals
2946+
sign (`=`) and an [rvalue](#lvalues-rvalues-and-temporaries) expression.
29472947

29482948
Evaluating an assignment expression [either copies or
29492949
moves](#moved-and-copied-types) its right-hand operand to its left-hand
@@ -3170,7 +3170,7 @@ stands for a *single* data field, whereas a wildcard `..` stands for *all* the
31703170
fields of a particular variant.
31713171

31723172
A `match` behaves differently depending on whether or not the head expression
3173-
is an [lvalue or an rvalue](#lvalues,-rvalues-and-temporaries). If the head
3173+
is an [lvalue or an rvalue](#lvalues-rvalues-and-temporaries). If the head
31743174
expression is an rvalue, it is first evaluated into a temporary location, and
31753175
the resulting value is sequentially compared to the patterns in the arms until
31763176
a match is found. The first arm with a matching pattern is chosen as the branch
@@ -3489,7 +3489,7 @@ enclosing `enum` or `struct` type itself. Such recursion has restrictions:
34893489

34903490
* Recursive types must include a nominal type in the recursion
34913491
(not mere [type definitions](grammar.html#type-definitions),
3492-
or other structural types such as [arrays](#array,-and-slice-types) or [tuples](#tuple-types)).
3492+
or other structural types such as [arrays](#array-and-slice-types) or [tuples](#tuple-types)).
34933493
* A recursive `enum` item must have at least one non-recursive constructor
34943494
(in order to give the recursion a basis case).
34953495
* The size of a recursive type must be finite;

src/doc/trpl/concurrency.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ For sharing references across threads, Rust provides a wrapper type called
5353
`Arc<T>`. `Arc<T>` implements `Send` and `Sync` if and only if `T` implements
5454
both `Send` and `Sync`. For example, an object of type `Arc<RefCell<U>>` cannot
5555
be transferred across threads because
56-
[`RefCell`](choosing-your-guarantees.html#refcell%3Ct%3E) does not implement
56+
[`RefCell`](choosing-your-guarantees.html#refcellt) does not implement
5757
`Sync`, consequently `Arc<RefCell<U>>` would not implement `Send`.
5858

5959
These two traits allow you to use the type system to make strong guarantees

src/doc/trpl/conditional-compilation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ These can nest arbitrarily:
3434
As for how to enable or disable these switches, if you’re using Cargo,
3535
they get set in the [`[features]` section][features] of your `Cargo.toml`:
3636

37-
[features]: http://doc.crates.io/manifest.html#the-%5Bfeatures%5D-section
37+
[features]: http://doc.crates.io/manifest.html#the-features-section
3838

3939
```toml
4040
[features]

src/doc/trpl/dining-philosophers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ ownership of the values it’s capturing. Primarily, the `p` variable of the
434434

435435
Inside the thread, all we do is call `eat()` on `p`. Also note that the call to `thread::spawn` lacks a trailing semicolon, making this an expression. This distinction is important, yielding the correct return value. For more details, read [Expressions vs. Statements][es].
436436

437-
[es]: functions.html#expressions-vs.-statements
437+
[es]: functions.html#expressions-vs-statements
438438

439439
```rust,ignore
440440
}).collect();

src/doc/trpl/error-handling.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ systems may want to jump around.
2828
* [The `Result` type](#the-result-type)
2929
* [Parsing integers](#parsing-integers)
3030
* [The `Result` type alias idiom](#the-result-type-alias-idiom)
31-
* [A brief interlude: unwrapping isn't evil](#a-brief-interlude-unwrapping-isn't-evil)
31+
* [A brief interlude: unwrapping isn't evil](#a-brief-interlude-unwrapping-isnt-evil)
3232
* [Working with multiple error types](#working-with-multiple-error-types)
3333
* [Composing `Option` and `Result`](#composing-option-and-result)
3434
* [The limits of combinators](#the-limits-of-combinators)
@@ -1470,7 +1470,7 @@ representation. But certainly, this will vary depending on use cases.
14701470
At a minimum, you should probably implement the
14711471
[`Error`](../std/error/trait.Error.html)
14721472
trait. This will give users of your library some minimum flexibility for
1473-
[composing errors](#the-real-try!-macro). Implementing the `Error` trait also
1473+
[composing errors](#the-real-try-macro). Implementing the `Error` trait also
14741474
means that users are guaranteed the ability to obtain a string representation
14751475
of an error (because it requires impls for both `fmt::Debug` and
14761476
`fmt::Display`).

src/doc/trpl/glossary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ In the example above `x` and `y` have arity 2. `z` has arity 3.
4242

4343
A type without a statically known size or alignment. ([more info][link])
4444

45-
[link]: ../nomicon/exotic-sizes.html#dynamically-sized-types-(dsts)
45+
[link]: ../nomicon/exotic-sizes.html#dynamically-sized-types-dsts
4646

4747
### Expression
4848

0 commit comments

Comments
 (0)