You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This produces an array containing each of these values in the order they are written.
27
27
28
28
r[expr.array.repeat]
29
-
The syntax for the second form is two expressions separated by a semicolon (`;`) enclosed in square brackets.
29
+
The syntax for the second form is an expression and a const argument separated by a semicolon (`;`) enclosed in square brackets.
30
30
31
31
r[expr.array.repeat-operand]
32
32
The expression before the `;` is called the *repeat operand*.
33
33
34
34
r[expr.array.length-operand]
35
-
The expression after the `;` is called the *length operand*.
35
+
The const argument after the `;` is called the *length operand*.
36
36
37
37
r[expr.array.length-restriction]
38
-
It must have type `usize` and be a [constant expression], such as a [literal] or a [constant item].
38
+
It must be a [const argument] of type `usize`.
39
39
40
40
r[expr.array.repeat-behavior]
41
41
An array expression of this form creates an array with the length of the value of the length operand with each element being a copy of the repeat operand.
@@ -111,7 +111,7 @@ The array index expression can be implemented for types other than arrays and sl
0 commit comments