Skip to content

Commit da910b7

Browse files
committed
Update from review comments.
1 parent 2f459e2 commit da910b7

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/const_eval.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ to be run.
5454
A _const context_ is one of the following:
5555

5656
* [Array type length expressions]
57-
* [Array repeat expressions][array expressions]
57+
* [Array repeat length expressions][array expressions]
5858
* The initializer of
5959
* [constants]
6060
* [statics]

src/items/constant-items.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
A *constant item* is an optionally named _[constant value]_ which is not associated
88
with a specific memory location in the program. Constants are essentially inlined
99
wherever they are used, meaning that they are copied directly into the relevant
10-
context when used. This includes usage of constants from external crates.
11-
References to the same constant are not necessarily guaranteed to refer to the
12-
same memory address.
10+
context when used. This includes usage of constants from external crates, and
11+
non-[`Copy`] types. References to the same constant are not necessarily
12+
guaranteed to refer to the same memory address.
1313

1414
Constants must be explicitly typed. The type must have a `'static` lifetime: any
1515
references in the initializer must have `'static` lifetimes.
@@ -95,3 +95,4 @@ m!(const _: () = (););
9595
[underscore imports]: use-declarations.md#underscore-imports
9696
[_Type_]: ../types.md#type-expressions
9797
[_Expression_]: ../expressions.md
98+
[`Copy`]: ../special-types-and-traits.md#copy

0 commit comments

Comments
 (0)