spec: spell the AIR array type array<T, N>
';' starts a comment in text AIR, so [T; N] cannot be parsed. Recorded as an erratum in RFC 0005; source syntax may keep [T; N].
This commit is contained in:
7 files changed
+20
-19
No files matched your search
@@ -30,7 +30,7 @@ Declaring `features [capabilities, effects, ownership]` grants no authority. It
|
||||
|
||||
| Feature | Status | Phase | Depends on | Semantic block |
|
||||
|---|---|---|---|---|
|
||||
| `arrays` | published | 1 | `ownership` | `[T; N]`, `slice<T>`, `slice_mut<T>`, `array.splat`, `borrow.index[.proven]`, `slice.*`, `guard`, bounds facts (spec 07a, spec 08 §12) |
|
||||
| `arrays` | published | 1 | `ownership` | `array<T, N>`, `slice<T>`, `slice_mut<T>`, `array.splat`, `borrow.index[.proven]`, `slice.*`, `guard`, bounds facts (spec 07a, spec 08 §12) |
|
||||
| `atomics` | reserved | 5 | `ownership` | atomic types, the five orderings, fences, `atomic.*` instructions |
|
||||
| `capabilities` | reserved | 2 | `effects`, `ownership` | `cap<…>` values, narrowing, delegation, capability-gated intrinsics |
|
||||
| `borrow_joins` | reserved | — | `ownership` | borrow-typed block parameters (spec 08 §11.6); unscheduled |
|
||||
|
||||
@@ -103,7 +103,7 @@ target = global "(" [ local_list ] ")" ;
|
||||
|
||||
type = int_type | "bool" | "void" | "never" | global
|
||||
| ( "local" | "ref" | "mut" ) "<" type ">" (* feature ownership *)
|
||||
| "[" type ";" int_lit "]" (* feature arrays *)
|
||||
| "array" "<" type "," int_lit ">" (* feature arrays; ";" starts a comment, so source syntax [T; N] is spelled array<T, N> *)
|
||||
| ( "slice" | "slice_mut" ) "<" type ">" ; (* feature arrays *)
|
||||
int_type = "u8" | "u16" | "u32" | "u64" | "u128" | "usize"
|
||||
| "i8" | "i16" | "i32" | "i64" | "i128" | "isize" ;
|
||||
|
||||
Reference in new issue
Block a user