File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ to be run.
5454A _ 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]
Original file line number Diff line number Diff line change 77A * constant item* is an optionally named _ [ constant value] _ which is not associated
88with a specific memory location in the program. Constants are essentially inlined
99wherever 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
1414Constants must be explicitly typed. The type must have a ` 'static ` lifetime: any
1515references 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
You can’t perform that action at this time.
0 commit comments