Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some broken links. #519

Merged
merged 1 commit into from
Jan 27, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 35 additions & 31 deletions src/const_eval.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ can be evaluated at compile-time.
Certain forms of expressions, called constant expressions, can be evaluated at
compile time. In [const contexts](#const-context), these are the only allowed
expressions, and are always evaluated at compile time. In other places, such as
[let statement]s, constant expressions *may*
[let statements], constant expressions *may*
be, but are not guaranteed to be, evaluated at compile time. Behaviors such as
out of bounds [array indexing] or [overflow] are compiler errors if the value
must be evaluated at compile time (i.e. in const contexts). Otherwise, these
Expand All @@ -20,19 +20,19 @@ also constant expressions and do not cause any [`Drop::drop`][destructors] calls
to be ran.

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

[array type length expressions]: types/array.html
[enum discriminants]: items/enumerations.html#custom-discriminant-values-for-field-less-enumerations
[constants]: items/constant-items.html
[statics]: items/static-items.html
[expressions]: expressions.html
[array indexing]: expressions/array-expr.html#array-and-slice-indexing-expressions
[overflow]: expressions/operator-expr.html#overflow
[destructors]: destructors.html
[literals]: expressions/literal-expr.html
[paths]: expressions/path-expr.html
[tuple expressions]: expressions/tuple-expr.html
[arithmetic, logical]: expressions/operator-expr.html#arithmetic-and-logical-binary-operators
[array expressions]: expressions/array-expr.html
[struct]: expressions/struct-expr.html
[enum variant]: expressions/enum-variant-expr.html
[block expressions]: expressions/block-expr.html
[field]: expressions/field-expr.html
[array indexing]: expressions/array-expr.html#array-and-slice-indexing-expressions
[slice]: types/slice.html
[range expressions]: expressions/range-expr.html
[array indexing]: expressions/array-expr.html#array-and-slice-indexing-expressions
[array type length expressions]: types/array.html
[assignment expressions]: expressions/operator-expr.html#assignment-expressions
[assignment operator expressions]: expressions/operator-expr.html#compound-assignment-expressions
[block expressions]: expressions/block-expr.html
[borrow]: expressions/operator-expr.html#borrow-operators
[cast]: expressions/operator-expr.html#type-cast-expressions
[closure expressions]: expressions/closure-expr.html
[negation]: expressions/operator-expr.html#negation-operators
[arithmetic, logical]: expressions/operator-expr.html#arithmetic-and-logical-binary-operators
[comparison]: expressions/operator-expr.html#comparison-operators
[lazy boolean]: expressions/operator-expr.html#lazy-boolean-operators
[borrow]: expressions/operator-expr.html#borrow-operators
[interior mutability]: interior-mutability.html
[constants]: items/constant-items.html
[dereference operator]: expressions/operator-expr.html#the-dereference-operator
[destructors]: destructors.html
[enum discriminants]: items/enumerations.html#custom-discriminant-values-for-field-less-enumerations
[enum variant]: expressions/enum-variant-expr.html
[expression statements]: statements.html#expression-statements
[expressions]: expressions.html
[field]: expressions/field-expr.html
[functions]: items/functions.html
[grouped]: expressions/grouped-expr.html
[cast]: expressions/operator-expr.html#type-cast-expressions
[let statement]: statements.html#let-statements
[patterns]: patterns.html
[interior mutability]: interior-mutability.html
[lazy boolean]: expressions/operator-expr.html#lazy-boolean-operators
[let statements]: statements.html#let-statements
[literals]: expressions/literal-expr.html
[negation]: expressions/operator-expr.html#negation-operators
[overflow]: expressions/operator-expr.html#overflow
[paths]: expressions/path-expr.html
[patterns]: patterns.html
[range expressions]: expressions/range-expr.html
[slice]: types/slice.html
[statics]: items/static-items.html
[struct]: expressions/struct-expr.html
[tuple expressions]: expressions/tuple-expr.html