File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -3,15 +3,15 @@ r[type.array]
3
3
4
4
r[ type.array.syntax]
5
5
``` grammar,types
6
- ArrayType -> `[` Type `;` Expression `]`
6
+ ArrayType -> `[` Type `;` GenericArgsConst `]`
7
7
```
8
8
9
9
r[ type.array.intro]
10
10
An array is a fixed-size sequence of ` N ` elements of type ` T ` . The array type
11
11
is written as ` [T; N] ` .
12
12
13
13
r[ type.array.constraint]
14
- The size is a [ constant expression ] that evaluates to a [ ` usize ` ] .
14
+ The size is a [ const argument ] of type [ ` usize ` ] .
15
15
16
16
Examples:
17
17
@@ -32,3 +32,4 @@ always bounds-checked in safe methods and operators.
32
32
33
33
[ `usize` ] : numeric.md#machine-dependent-integer-types
34
34
[ constant expression ] : ../const_eval.md#constant-expressions
35
+ [ const argument ] : ../items/generics.md##const-generics
You can’t perform that action at this time.
0 commit comments