File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,11 @@ to be run.
38
38
* [ Closure expressions] which don't capture variables from the environment.
39
39
* Built-in [ negation] , [ arithmetic] , [ logical] , [ comparison] or [ lazy boolean]
40
40
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] .
43
46
* [ Grouped] expressions.
44
47
* [ Cast] expressions, except
45
48
* pointer to address casts and
@@ -49,6 +52,7 @@ to be run.
49
52
* [ if] , [ ` if let ` ] and [ match] expressions.
50
53
51
54
## Const context
55
+ [ const context ] : #const-context
52
56
53
57
A _ const context_ is one of the following:
54
58
You can’t perform that action at this time.
0 commit comments