Skip to content

Commit 0e741fd

Browse files
authored
Merge pull request #519 from ehuss/fix-const-links
Fix some broken links.
2 parents ec8bb56 + 0ba13bd commit 0e741fd

File tree

1 file changed

+35
-31
lines changed

1 file changed

+35
-31
lines changed

src/const_eval.md

+35-31
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ can be evaluated at compile-time.
99
Certain forms of expressions, called constant expressions, can be evaluated at
1010
compile time. In [const contexts](#const-context), these are the only allowed
1111
expressions, and are always evaluated at compile time. In other places, such as
12-
[let statement]s, constant expressions *may*
12+
[let statements], constant expressions *may*
1313
be, but are not guaranteed to be, evaluated at compile time. Behaviors such as
1414
out of bounds [array indexing] or [overflow] are compiler errors if the value
1515
must be evaluated at compile time (i.e. in const contexts). Otherwise, these
@@ -20,19 +20,19 @@ also constant expressions and do not cause any [`Drop::drop`][destructors] calls
2020
to be ran.
2121

2222
* [Literals].
23-
* [Paths] to [functions](items/functions.html) and constants.
23+
* [Paths] to [functions] and constants.
2424
Recursively defining constants is not allowed.
2525
* [Tuple expressions].
2626
* [Array expressions].
2727
* [Struct] expressions.
2828
* [Enum variant] expressions.
2929
* [Block expressions], including `unsafe` blocks.
30-
* [let statement]s and thus irrefutable [patterns], with the caveat that until `if` and `match`
30+
* [let statements] and thus irrefutable [patterns], with the caveat that until `if` and `match`
3131
are implemented, one cannot use both short circuiting operators (`&&` and `||`) and let
3232
statements within the same constant.
33-
* [assignment expressions](operator-expr.html#assignment-expressions)
34-
* [assignment operator expressions](operator-expr.html#compound-assignment-expressions)
35-
* [expression statements](statements.html#expression-statements)
33+
* [assignment expressions]
34+
* [assignment operator expressions]
35+
* [expression statements]
3636
* [Field] expressions.
3737
* Index expressions, [array indexing] or [slice] with a `usize`.
3838
* [Range expressions].
@@ -57,34 +57,38 @@ A _const context_ is one of the following:
5757
* [statics]
5858
* [enum discriminants]
5959

60-
[array type length expressions]: types/array.html
61-
[enum discriminants]: items/enumerations.html#custom-discriminant-values-for-field-less-enumerations
62-
[constants]: items/constant-items.html
63-
[statics]: items/static-items.html
64-
[expressions]: expressions.html
65-
[array indexing]: expressions/array-expr.html#array-and-slice-indexing-expressions
66-
[overflow]: expressions/operator-expr.html#overflow
67-
[destructors]: destructors.html
68-
[literals]: expressions/literal-expr.html
69-
[paths]: expressions/path-expr.html
70-
[tuple expressions]: expressions/tuple-expr.html
60+
[arithmetic, logical]: expressions/operator-expr.html#arithmetic-and-logical-binary-operators
7161
[array expressions]: expressions/array-expr.html
72-
[struct]: expressions/struct-expr.html
73-
[enum variant]: expressions/enum-variant-expr.html
74-
[block expressions]: expressions/block-expr.html
75-
[field]: expressions/field-expr.html
7662
[array indexing]: expressions/array-expr.html#array-and-slice-indexing-expressions
77-
[slice]: types/slice.html
78-
[range expressions]: expressions/range-expr.html
63+
[array indexing]: expressions/array-expr.html#array-and-slice-indexing-expressions
64+
[array type length expressions]: types/array.html
65+
[assignment expressions]: expressions/operator-expr.html#assignment-expressions
66+
[assignment operator expressions]: expressions/operator-expr.html#compound-assignment-expressions
67+
[block expressions]: expressions/block-expr.html
68+
[borrow]: expressions/operator-expr.html#borrow-operators
69+
[cast]: expressions/operator-expr.html#type-cast-expressions
7970
[closure expressions]: expressions/closure-expr.html
80-
[negation]: expressions/operator-expr.html#negation-operators
81-
[arithmetic, logical]: expressions/operator-expr.html#arithmetic-and-logical-binary-operators
8271
[comparison]: expressions/operator-expr.html#comparison-operators
83-
[lazy boolean]: expressions/operator-expr.html#lazy-boolean-operators
84-
[borrow]: expressions/operator-expr.html#borrow-operators
85-
[interior mutability]: interior-mutability.html
72+
[constants]: items/constant-items.html
8673
[dereference operator]: expressions/operator-expr.html#the-dereference-operator
74+
[destructors]: destructors.html
75+
[enum discriminants]: items/enumerations.html#custom-discriminant-values-for-field-less-enumerations
76+
[enum variant]: expressions/enum-variant-expr.html
77+
[expression statements]: statements.html#expression-statements
78+
[expressions]: expressions.html
79+
[field]: expressions/field-expr.html
80+
[functions]: items/functions.html
8781
[grouped]: expressions/grouped-expr.html
88-
[cast]: expressions/operator-expr.html#type-cast-expressions
89-
[let statement]: statements.html#let-statements
90-
[patterns]: patterns.html
82+
[interior mutability]: interior-mutability.html
83+
[lazy boolean]: expressions/operator-expr.html#lazy-boolean-operators
84+
[let statements]: statements.html#let-statements
85+
[literals]: expressions/literal-expr.html
86+
[negation]: expressions/operator-expr.html#negation-operators
87+
[overflow]: expressions/operator-expr.html#overflow
88+
[paths]: expressions/path-expr.html
89+
[patterns]: patterns.html
90+
[range expressions]: expressions/range-expr.html
91+
[slice]: types/slice.html
92+
[statics]: items/static-items.html
93+
[struct]: expressions/struct-expr.html
94+
[tuple expressions]: expressions/tuple-expr.html

0 commit comments

Comments
 (0)