File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,11 @@ to be run.
3838* [ Closure expressions] which don't capture variables from the environment.
3939* Built-in [ negation] , [ arithmetic] , [ logical] , [ comparison] or [ lazy boolean]
4040 operators used on integer and floating point types, ` bool ` , and ` char ` .
41- * Shared [ borrow] s, except if applied to a type with [ interior mutability] .
42- * The [ dereference operator] except for raw pointers.
41+ * All forms of [ borrow] s, including raw borrows, with one limitation:
42+ mutable borrows and shared borrows to values with interior mutability
43+ are only allowed to refer to * transient* places. A place is * transient*
44+ if its lifetime is strictly contained inside the current [ const context] .
45+ * The [ dereference operator] .
4346* [ Grouped] expressions.
4447* [ Cast] expressions, except
4548 * pointer to address casts and
@@ -49,6 +52,7 @@ to be run.
4952* [ if] , [ ` if let ` ] and [ match] expressions.
5053
5154## Const context
55+ [ const context ] : #const-context
5256
5357A _ const context_ is one of the following:
5458
You can’t perform that action at this time.
0 commit comments