We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8107908 commit 1354de7Copy full SHA for 1354de7
text/0000-compile-time-asserts.md
@@ -11,11 +11,13 @@ insert an unconditional runtime-panic and issue a warning.
11
12
# Definition of constant evaluation context
13
14
-There are exactly three places where an expression needs to be constant.
+There are exactly five places where an expression needs to be constant.
15
16
- the initializer of a constant `const foo: ty = EXPR` or `static foo: ty = EXPR`
17
- the size of an array `[T; EXPR]`
18
- the length of a repeat expression `[VAL; LEN_EXPR]`
19
+- C-Like enum variant discriminant values
20
+- patterns
21
22
In the future the body of `const fn` might also be interpreted as a constant
23
evaluation context.
0 commit comments