Skip to content

Commit b81216e

Browse files
nrcManishearth
authored andcommitted
Fallout - change array syntax to use ;
1 parent d881a71 commit b81216e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

reference.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,11 +1438,11 @@ the `static` lifetime, fixed-size arrays, tuples, enum variants, and structs.
14381438
const BIT1: uint = 1 << 0;
14391439
const BIT2: uint = 1 << 1;
14401440
1441-
const BITS: [uint, ..2] = [BIT1, BIT2];
1441+
const BITS: [uint; 2] = [BIT1, BIT2];
14421442
const STRING: &'static str = "bitstring";
14431443
14441444
struct BitsNStrings<'a> {
1445-
mybits: [uint, ..2],
1445+
mybits: [uint; 2],
14461446
mystring: &'a str
14471447
}
14481448
@@ -2923,7 +2923,7 @@ constant expression that can be evaluated at compile time, such as a
29232923
```
29242924
[1i, 2, 3, 4];
29252925
["a", "b", "c", "d"];
2926-
[0i, ..128]; // array with 128 zeros
2926+
[0i; 128]; // array with 128 zeros
29272927
[0u8, 0u8, 0u8, 0u8];
29282928
```
29292929

@@ -3691,7 +3691,7 @@ An example of each kind:
36913691

36923692
```{rust}
36933693
let vec: Vec<int> = vec![1, 2, 3];
3694-
let arr: [int, ..3] = [1, 2, 3];
3694+
let arr: [int; 3] = [1, 2, 3];
36953695
let s: &[int] = vec.as_slice();
36963696
```
36973697

0 commit comments

Comments
 (0)