Skip to content

Commit 0f24c33

Browse files
committed
Add a comment about !Copy types in let bindings in constants
1 parent a048a3e commit 0f24c33

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

text/0000-const-locals.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ exists but is still disallowed.
2424
everywhere else. Historically these did not exist in constants and const fn
2525
because it would have been very hard to support them in the old const evaluator.
2626

27+
This means that you can only move out of any let binding once, even though in a
28+
const environment obtaining a copy of the object could be done by executing the
29+
code twice, side effect free. All invariants held by runtime code are also
30+
upheld by constant evaluation.
31+
2732
# Reference-level explanation
2833
[reference-level-explanation]: #reference-level-explanation
2934

0 commit comments

Comments
 (0)