File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ The array index expression can be implemented for types other than arrays and sl
111
111
[ IndexMut ] : std::ops::IndexMut
112
112
[ Index ] : std::ops::Index
113
113
[ array ] : ../types/array.md
114
- [ const argument ] : ../items/generics.md
114
+ [ const argument ] : ../items/generics.md#const-generics
115
115
[ constant item ] : ../items/constant-items.md
116
116
[ literal ] : ../tokens.md#literals
117
117
[ memory location ] : ../expressions.md#place-expressions-and-value-expressions
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