@@ -27,9 +27,7 @@ to be run.
27
27
* [ Struct] expressions.
28
28
* [ Enum variant] expressions.
29
29
* [ Block expressions] , including ` unsafe ` blocks.
30
- * [ let statements] and thus irrefutable [ patterns] , with the caveat that until ` if ` and ` match `
31
- are implemented, one cannot use both short circuiting operators (` && ` and ` || ` ) and let
32
- statements within the same constant.
30
+ * [ let statements] and thus irrefutable [ patterns] , including mutable bindings
33
31
* [ assignment expressions]
34
32
* [ compound assignment expressions]
35
33
* [ expression statements]
@@ -45,6 +43,8 @@ to be run.
45
43
* [ Cast] expressions, except pointer to address and
46
44
function pointer to address casts.
47
45
* Calls of [ const functions] and const methods.
46
+ * [ loop] , [ while] and ` while let ` expressions.
47
+ * [ if] , [ ` if let ` ] and [ match] expressions.
48
48
49
49
## Const context
50
50
@@ -81,10 +81,14 @@ A _const context_ is one of the following:
81
81
[ functions ] : items/functions.md
82
82
[ grouped ] : expressions/grouped-expr.md
83
83
[ interior mutability ] : interior-mutability.md
84
+ [ if ] : expressions/if-expr.md#if-expressions
85
+ [ `if let` ] : expressions/if-expr.md#if-let-expressions
84
86
[ lazy boolean ] : expressions/operator-expr.md#lazy-boolean-operators
85
87
[ let statements ] : statements.md#let-statements
86
88
[ literals ] : expressions/literal-expr.md
87
89
[ logical ] : expressions/operator-expr.md#arithmetic-and-logical-binary-operators
90
+ [ loop ] : expressions/loop-expr.md#infinite-loops
91
+ [ match ] : expressions/match-expr.md
88
92
[ negation ] : expressions/operator-expr.md#negation-operators
89
93
[ overflow ] : expressions/operator-expr.md#overflow
90
94
[ paths ] : expressions/path-expr.md
@@ -94,3 +98,5 @@ A _const context_ is one of the following:
94
98
[ statics ] : items/static-items.md
95
99
[ struct ] : expressions/struct-expr.md
96
100
[ tuple expressions ] : expressions/tuple-expr.md
101
+ [ while ] : expressions/loop-expr.md#predicate-loops
102
+ [ `while let` ] : expressions/loop-expr.md#predicate-pattern-loops
0 commit comments