diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2014-12-20 15:20:51 +1300 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2014-12-20 15:23:29 +1300 |
| commit | 2e86929a4a5a36f3993e577b4582ba70d84bbb40 (patch) | |
| tree | 7b3e8049edae74dde7a870a7173afed6f9fc744e /src/test/debuginfo | |
| parent | cbe9fb45bc705a89f23b434c686544d490923596 (diff) | |
| download | rust-2e86929a4a5a36f3993e577b4582ba70d84bbb40.tar.gz rust-2e86929a4a5a36f3993e577b4582ba70d84bbb40.zip | |
Allow use of `[_ ; n]` syntax for fixed length and repeating arrays.
This does NOT break any existing programs because the `[_, ..n]` syntax is also supported.
Diffstat (limited to 'src/test/debuginfo')
| -rw-r--r-- | src/test/debuginfo/evec-in-struct.rs | 18 | ||||
| -rw-r--r-- | src/test/debuginfo/lexical-scopes-in-block-expression.rs | 4 | ||||
| -rw-r--r-- | src/test/debuginfo/recursive-struct.rs | 2 | ||||
| -rw-r--r-- | src/test/debuginfo/type-names.rs | 4 | ||||
| -rw-r--r-- | src/test/debuginfo/vec.rs | 2 |
5 files changed, 15 insertions, 15 deletions
diff --git a/src/test/debuginfo/evec-in-struct.rs b/src/test/debuginfo/evec-in-struct.rs index aab9c446a9e..786868f6b89 100644 --- a/src/test/debuginfo/evec-in-struct.rs +++ b/src/test/debuginfo/evec-in-struct.rs @@ -53,28 +53,28 @@ #![allow(unused_variables)] struct NoPadding1 { - x: [u32, ..3], + x: [u32; 3], y: i32, - z: [f32, ..2] + z: [f32; 2] } struct NoPadding2 { - x: [u32, ..3], - y: [[u32, ..2], ..2] + x: [u32; 3], + y: [[u32; 2]; 2] } struct StructInternalPadding { - x: [i16, ..2], - y: [i64, ..2] + x: [i16; 2], + y: [i64; 2] } struct SingleVec { - x: [i16, ..5] + x: [i16; 5] } struct StructPaddedAtEnd { - x: [i64, ..2], - y: [i16, ..2] + x: [i64; 2], + y: [i16; 2] } fn main() { diff --git a/src/test/debuginfo/lexical-scopes-in-block-expression.rs b/src/test/debuginfo/lexical-scopes-in-block-expression.rs index a1f34aea0f2..41dee642fea 100644 --- a/src/test/debuginfo/lexical-scopes-in-block-expression.rs +++ b/src/test/debuginfo/lexical-scopes-in-block-expression.rs @@ -450,7 +450,7 @@ fn main() { sentinel(); val - }, ..10]; + }; 10]; zzz(); // #break sentinel(); @@ -491,7 +491,7 @@ fn main() { sentinel(); // index expression - let a_vector = [10i, ..20]; + let a_vector = [10i; 20]; let _ = a_vector[{ zzz(); // #break sentinel(); diff --git a/src/test/debuginfo/recursive-struct.rs b/src/test/debuginfo/recursive-struct.rs index 032b8b1fa26..8cc0fdabfc2 100644 --- a/src/test/debuginfo/recursive-struct.rs +++ b/src/test/debuginfo/recursive-struct.rs @@ -143,7 +143,7 @@ fn main() { value: 2, }; - let vec_unique: [UniqueNode<f32>, ..1] = [UniqueNode { + let vec_unique: [UniqueNode<f32>; 1] = [UniqueNode { next: Val { val: box UniqueNode { next: Empty, diff --git a/src/test/debuginfo/type-names.rs b/src/test/debuginfo/type-names.rs index d72b080409e..286c44667c5 100644 --- a/src/test/debuginfo/type-names.rs +++ b/src/test/debuginfo/type-names.rs @@ -99,10 +99,10 @@ // VECTORS // gdb-command:whatis fixed_size_vec1 -// gdb-check:type = struct ([type-names::Struct1, ..3], i16) +// gdb-check:type = struct ([type-names::Struct1; 3], i16) // gdb-command:whatis fixed_size_vec2 -// gdb-check:type = struct ([uint, ..3], i16) +// gdb-check:type = struct ([uint; 3], i16) // gdb-command:whatis slice1 // gdb-check:type = struct &[uint] diff --git a/src/test/debuginfo/vec.rs b/src/test/debuginfo/vec.rs index fd422a90e63..00c93653cf4 100644 --- a/src/test/debuginfo/vec.rs +++ b/src/test/debuginfo/vec.rs @@ -30,7 +30,7 @@ #![allow(unused_variables)] -static mut VECT: [i32, ..3] = [1, 2, 3]; +static mut VECT: [i32; 3] = [1, 2, 3]; fn main() { let a = [1i, 2, 3]; |
