From aa1dab6c8f3cf89016823caf32bcc3b63b81af1e Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 28 Aug 2024 07:39:33 +0200 Subject: [PATCH] talk about const context, not const items --- src/const_eval.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/const_eval.md b/src/const_eval.md index dfcb61b07..eca2530ea 100644 --- a/src/const_eval.md +++ b/src/const_eval.md @@ -41,7 +41,7 @@ to be run. * All forms of [borrow]s, including raw borrows, with one limitation: mutable borrows and shared borrows to values with interior mutability are only allowed to refer to *transient* places. A place is *transient* - if it will be deallocated before the end of evaluating the current constant item. + if its lifetime is strictly contained inside the current [const context]. * The [dereference operator]. * [Grouped] expressions. * [Cast] expressions, except @@ -52,6 +52,7 @@ to be run. * [if], [`if let`] and [match] expressions. ## Const context +[const context]: #const-context A _const context_ is one of the following: