From 142dbd65da9ae168c198162f0e1eec1c960e91f5 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Fri, 22 Mar 2013 18:52:04 -0700 Subject: [PATCH] librustc: Remove all uses of the old `[T * N]` fixed-length vector syntax --- src/libcore/cleanup.rs | 10 +++++----- src/libcore/hash.rs | 6 +++--- src/libcore/libc.rs | 8 ++++---- src/libcore/num/strconv.rs | 10 ++++++---- src/libcore/rt/context.rs | 6 +++--- src/libcore/sys.rs | 2 +- src/libcore/trie.rs | 2 +- src/libcore/vec.rs | 2 +- src/librustc/middle/typeck/infer/region_inference.rs | 4 ++-- src/libstd/flatpipes.rs | 6 +++--- src/libsyntax/parse/parser.rs | 2 +- src/test/bench/noise.rs | 6 +++--- src/test/bench/sudoku.rs | 6 +++--- src/test/compile-fail/const-cast-wrong-type.rs | 2 +- src/test/compile-fail/evec-subtyping.rs | 6 +++--- src/test/compile-fail/issue-4517.rs | 2 +- src/test/run-pass/const-autoderef.rs | 4 ++-- src/test/run-pass/const-enum-vector.rs | 2 +- src/test/run-pass/const-expr-in-fixed-length-vec.rs | 2 +- src/test/run-pass/const-fields-and-indexing.rs | 2 +- src/test/run-pass/const-region-ptrs-noncopy.rs | 2 +- src/test/run-pass/const-str-ptr.rs | 4 ++-- src/test/run-pass/const-vecs-and-slices.rs | 2 +- src/test/run-pass/evec-internal-boxes.rs | 4 ++-- src/test/run-pass/evec-internal.rs | 10 +++++----- src/test/run-pass/fixed_length_vec_glue.rs | 2 +- src/test/run-pass/issue-3656.rs | 2 +- src/test/run-pass/region-dependent-addr-of.rs | 2 +- src/test/run-pass/vec-fixed-length.rs | 2 +- 29 files changed, 61 insertions(+), 59 deletions(-) diff --git a/src/libcore/cleanup.rs b/src/libcore/cleanup.rs index 66eeb339700..3beb1add3ea 100644 --- a/src/libcore/cleanup.rs +++ b/src/libcore/cleanup.rs @@ -38,12 +38,12 @@ struct MemoryRegion { priv opaque: () } #[cfg(target_arch="x86")] #[cfg(target_arch="arm")] struct Registers { - data: [u32 * 16] + data: [u32, ..16] } #[cfg(target_arch="mips")] struct Registers { - data: [u32 * 32] + data: [u32, ..32] } #[cfg(target_arch="x86")] @@ -52,12 +52,12 @@ struct Registers { struct Context { regs: Registers, next: *Context, - pad: [u32 * 3] + pad: [u32, ..3] } #[cfg(target_arch="x86_64")] struct Registers { - data: [u64 * 22] + data: [u64, ..22] } #[cfg(target_arch="x86_64")] @@ -80,7 +80,7 @@ struct Task { // Public fields refcount: intptr_t, // 0 id: TaskID, // 4 - pad: [u32 * 2], // 8 + pad: [u32, ..2], // 8 ctx: Context, // 16 stack_segment: *StackSegment, // 96 runtime_sp: uintptr_t, // 100 diff --git a/src/libcore/hash.rs b/src/libcore/hash.rs index c1e9e658df0..7b3b49b7ee9 100644 --- a/src/libcore/hash.rs +++ b/src/libcore/hash.rs @@ -162,7 +162,7 @@ struct SipState { mut v1: u64, mut v2: u64, mut v3: u64, - mut tail: [u8 * 8], // unprocessed bytes + mut tail: [u8, ..8], // unprocessed bytes mut ntail: uint, // how many bytes in tail are valid } @@ -369,7 +369,7 @@ fn reset(&self) { #[test] pub fn test_siphash() { - let vecs : [[u8 * 8] * 64] = [ + let vecs : [[u8, ..8], ..64] = [ [ 0x31, 0x0e, 0x0e, 0xdd, 0x47, 0xdb, 0x6f, 0x72, ], [ 0xfd, 0x67, 0xdc, 0x93, 0xc5, 0x39, 0xf8, 0x74, ], [ 0x5a, 0x4f, 0xa9, 0xd9, 0x09, 0x80, 0x6c, 0x0d, ], @@ -443,7 +443,7 @@ pub fn test_siphash() { let stream_inc = &State(k0,k1); let stream_full = &State(k0,k1); - fn to_hex_str(r: &[u8 * 8]) -> ~str { + fn to_hex_str(r: &[u8, ..8]) -> ~str { let mut s = ~""; for vec::each(*r) |b| { s += uint::to_str_radix(*b as uint, 16u); diff --git a/src/libcore/libc.rs b/src/libcore/libc.rs index 47eece81ce1..084437354fb 100644 --- a/src/libcore/libc.rs +++ b/src/libcore/libc.rs @@ -342,7 +342,7 @@ pub struct stat { st_mtime_nsec: c_long, st_ctime: time_t, st_ctime_nsec: c_long, - __unused: [c_long * 3], + __unused: [c_long, ..3], } } pub mod posix08 { @@ -430,7 +430,7 @@ pub struct stat { st_lspare: int32_t, st_birthtime: time_t, st_birthtime_nsec: c_long, - __unused: [uint8_t * 2], + __unused: [uint8_t, ..2], } } pub mod posix08 { @@ -631,7 +631,7 @@ pub struct stat { st_flags: uint32_t, st_gen: uint32_t, st_lspare: int32_t, - st_qspare: [int64_t * 2], + st_qspare: [int64_t, ..2], } } pub mod posix08 { @@ -712,7 +712,7 @@ pub struct stat { st_flags: uint32_t, st_gen: uint32_t, st_lspare: int32_t, - st_qspare: [int64_t * 2], + st_qspare: [int64_t, ..2], } } pub mod posix08 { diff --git a/src/libcore/num/strconv.rs b/src/libcore/num/strconv.rs index ce6c015c131..5299203eb42 100644 --- a/src/libcore/num/strconv.rs +++ b/src/libcore/num/strconv.rs @@ -132,10 +132,12 @@ impl NumStrConv for $t { // Special value strings as [u8] consts. -static inf_buf: [u8*3] = ['i' as u8, 'n' as u8, 'f' as u8]; -static positive_inf_buf: [u8*4] = ['+' as u8, 'i' as u8, 'n' as u8, 'f' as u8]; -static negative_inf_buf: [u8*4] = ['-' as u8, 'i' as u8, 'n' as u8, 'f' as u8]; -static nan_buf: [u8*3] = ['N' as u8, 'a' as u8, 'N' as u8]; +static inf_buf: [u8, ..3] = ['i' as u8, 'n' as u8, 'f' as u8]; +static positive_inf_buf: [u8, ..4] = ['+' as u8, 'i' as u8, 'n' as u8, + 'f' as u8]; +static negative_inf_buf: [u8, ..4] = ['-' as u8, 'i' as u8, 'n' as u8, + 'f' as u8]; +static nan_buf: [u8, ..3] = ['N' as u8, 'a' as u8, 'N' as u8]; /** * Converts a number to its string representation as a byte vector. diff --git a/src/libcore/rt/context.rs b/src/libcore/rt/context.rs index 527acd4d1b1..7237fe118d8 100644 --- a/src/libcore/rt/context.rs +++ b/src/libcore/rt/context.rs @@ -123,7 +123,7 @@ fn initialize_call_frame(regs: &mut Registers, fptr: *c_void, arg: *c_void, sp: } #[cfg(target_arch = "x86_64")] -type Registers = [uint * 22]; +type Registers = [uint, ..22]; #[cfg(target_arch = "x86_64")] fn new_regs() -> ~Registers { ~[0, .. 22] } @@ -157,7 +157,7 @@ fn initialize_call_frame(regs: &mut Registers, fptr: *c_void, arg: *c_void, sp: } #[cfg(target_arch = "arm")] -type Registers = [uint * 32]; +type Registers = [uint, ..32]; #[cfg(target_arch = "arm")] fn new_regs() -> ~Registers { ~[0, .. 32] } @@ -175,7 +175,7 @@ fn initialize_call_frame(regs: &mut Registers, fptr: *c_void, arg: *c_void, sp: } #[cfg(target_arch = "mips")] -type Registers = [uint * 32]; +type Registers = [uint, ..32]; #[cfg(target_arch = "mips")] fn new_regs() -> ~Registers { ~[0, .. 32] } diff --git a/src/libcore/sys.rs b/src/libcore/sys.rs index 706cb10dba9..69991259cf2 100644 --- a/src/libcore/sys.rs +++ b/src/libcore/sys.rs @@ -194,7 +194,7 @@ pub fn size_of_64() { #[test] pub fn nonzero_size_of_basic() { - type Z = [i8 * 0]; + type Z = [i8, ..0]; fail_unless!(size_of::() == 0u); fail_unless!(nonzero_size_of::() == 1u); fail_unless!(nonzero_size_of::() == size_of::()); diff --git a/src/libcore/trie.rs b/src/libcore/trie.rs index 012e0055674..4c4be33ea17 100644 --- a/src/libcore/trie.rs +++ b/src/libcore/trie.rs @@ -223,7 +223,7 @@ fn remove(&mut self, value: &uint) -> bool { self.map.remove(value) } struct TrieNode { count: uint, - children: [Child * SIZE] + children: [Child, ..SIZE] } impl TrieNode { diff --git a/src/libcore/vec.rs b/src/libcore/vec.rs index afacffb92c9..256b4c4922e 100644 --- a/src/libcore/vec.rs +++ b/src/libcore/vec.rs @@ -2636,7 +2636,7 @@ fn test_is_empty() { #[test] fn test_len_divzero() { - type Z = [i8 * 0]; + type Z = [i8, ..0]; let v0 : &[Z] = &[]; let v1 : &[Z] = &[[]]; let v2 : &[Z] = &[[], []]; diff --git a/src/librustc/middle/typeck/infer/region_inference.rs b/src/librustc/middle/typeck/infer/region_inference.rs index 45c7ad2f8f8..031363469cd 100644 --- a/src/librustc/middle/typeck/infer/region_inference.rs +++ b/src/librustc/middle/typeck/infer/region_inference.rs @@ -1201,11 +1201,11 @@ struct GraphNode { span: span, classification: Classification, value: GraphNodeValue, - head_edge: [uint * 2], + head_edge: [uint, ..2], } struct GraphEdge { - next_edge: [uint * 2], + next_edge: [uint, ..2], constraint: Constraint, span: span, } diff --git a/src/libstd/flatpipes.rs b/src/libstd/flatpipes.rs index 587509af9fa..01a7cbfe604 100644 --- a/src/libstd/flatpipes.rs +++ b/src/libstd/flatpipes.rs @@ -254,7 +254,7 @@ pub trait ByteChan { fn send(&self, val: ~[u8]); } -static CONTINUE: [u8 * 4] = [0xAA, 0xBB, 0xCC, 0xDD]; +static CONTINUE: [u8, ..4] = [0xAA, 0xBB, 0xCC, 0xDD]; impl,P:BytePort> GenericPort for FlatPort { fn recv(&self) -> T { @@ -921,7 +921,7 @@ fn test_try_recv_none2_pipe() { } fn test_try_recv_none3(loader: PortLoader

) { - static CONTINUE: [u8 * 4] = [0xAA, 0xBB, 0xCC, 0xDD]; + static CONTINUE: [u8, ..4] = [0xAA, 0xBB, 0xCC, 0xDD]; // The control word is followed by garbage let bytes = CONTINUE.to_vec() + ~[0]; let port = loader(bytes); @@ -940,7 +940,7 @@ fn test_try_recv_none3_pipe() { fn test_try_recv_none4(+loader: PortLoader

) { fail_unless!(do task::try || { - static CONTINUE: [u8 * 4] = [0xAA, 0xBB, 0xCC, 0xDD]; + static CONTINUE: [u8, ..4] = [0xAA, 0xBB, 0xCC, 0xDD]; // The control word is followed by a valid length, // then undeserializable garbage let len_bytes = do io::u64_to_be_bytes( diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index fb582ff3061..410ea975dd8 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -251,7 +251,7 @@ pub struct Parser { token: @mut token::Token, span: @mut span, last_span: @mut span, - buffer: @mut [TokenAndSpan * 4], + buffer: @mut [TokenAndSpan, ..4], buffer_start: @mut int, buffer_end: @mut int, tokens_consumed: @mut uint, diff --git a/src/test/bench/noise.rs b/src/test/bench/noise.rs index 7993822afd8..d28382abaa3 100644 --- a/src/test/bench/noise.rs +++ b/src/test/bench/noise.rs @@ -24,8 +24,8 @@ fn gradient(orig: Vec2, grad: Vec2, p: Vec2) -> f32 { } struct Noise2DContext { - rgradients: [Vec2 * 256], - permutations: [int * 256], + rgradients: [Vec2, ..256], + permutations: [int, ..256], } fn Noise2DContext() -> ~Noise2DContext { @@ -50,7 +50,7 @@ fn get_gradient(&self, x: int, y: int) -> Vec2 { } #[inline(always)] - fn get_gradients(&self, gradients: &mut [Vec2 * 4], origins: &mut [Vec2 * 4], x: f32, y: f32) { + fn get_gradients(&self, gradients: &mut [Vec2, ..4], origins: &mut [Vec2, ..4], x: f32, y: f32) { let x0f = f32::floor(x); let y0f = f32::floor(y); let x0 = x0f as int; diff --git a/src/test/bench/sudoku.rs b/src/test/bench/sudoku.rs index dcc5fe58755..09c9e27d4db 100644 --- a/src/test/bench/sudoku.rs +++ b/src/test/bench/sudoku.rs @@ -44,7 +44,7 @@ pub fn new(g: grid) -> Sudoku { return Sudoku { grid: g } } - pub fn from_vec(vec: &[[u8 * 9] * 9]) -> Sudoku { + pub fn from_vec(vec: &[[u8, ..9], ..9]) -> Sudoku { let mut g = do vec::from_fn(9u) |i| { do vec::from_fn(9u) |j| { vec[i][j] } }; @@ -183,7 +183,7 @@ fn remove(&mut self, color: u8) { } } -static default_sudoku: [[u8 * 9] * 9] = [ +static default_sudoku: [[u8, ..9], ..9] = [ /* 0 1 2 3 4 5 6 7 8 */ /* 0 */ [0u8, 4u8, 0u8, 6u8, 0u8, 0u8, 0u8, 3u8, 2u8], /* 1 */ [0u8, 0u8, 8u8, 0u8, 2u8, 0u8, 0u8, 0u8, 0u8], @@ -197,7 +197,7 @@ fn remove(&mut self, color: u8) { ]; #[cfg(test)] -static default_solution: [[u8 * 9] * 9] = [ +static default_solution: [[u8, ..9], ..9] = [ /* 0 1 2 3 4 5 6 7 8 */ /* 0 */ [1u8, 4u8, 9u8, 6u8, 7u8, 5u8, 8u8, 3u8, 2u8], /* 1 */ [5u8, 3u8, 8u8, 1u8, 2u8, 9u8, 7u8, 4u8, 6u8], diff --git a/src/test/compile-fail/const-cast-wrong-type.rs b/src/test/compile-fail/const-cast-wrong-type.rs index 677f4318db7..875358ea142 100644 --- a/src/test/compile-fail/const-cast-wrong-type.rs +++ b/src/test/compile-fail/const-cast-wrong-type.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -static a: [u8 * 3] = ['h' as u8, 'i' as u8, 0 as u8]; +static a: [u8, ..3] = ['h' as u8, 'i' as u8, 0 as u8]; static b: *i8 = &a as *i8; //~ ERROR mismatched types fn main() { diff --git a/src/test/compile-fail/evec-subtyping.rs b/src/test/compile-fail/evec-subtyping.rs index 06baf5c834b..f9c8ba01f18 100644 --- a/src/test/compile-fail/evec-subtyping.rs +++ b/src/test/compile-fail/evec-subtyping.rs @@ -10,7 +10,7 @@ fn wants_box(x: @[uint]) { } fn wants_uniq(x: ~[uint]) { } -fn wants_three(x: [uint * 3]) { } +fn wants_three(x: [uint, ..3]) { } fn has_box(x: @[uint]) { wants_box(x); @@ -24,13 +24,13 @@ fn has_uniq(x: ~[uint]) { wants_three(x); //~ ERROR [] storage differs: expected 3 but found ~ } -fn has_three(x: [uint * 3]) { +fn has_three(x: [uint, ..3]) { wants_box(x); //~ ERROR [] storage differs: expected @ but found 3 wants_uniq(x); //~ ERROR [] storage differs: expected ~ but found 3 wants_three(x); } -fn has_four(x: [uint * 4]) { +fn has_four(x: [uint, ..4]) { wants_box(x); //~ ERROR [] storage differs: expected @ but found 4 wants_uniq(x); //~ ERROR [] storage differs: expected ~ but found 4 wants_three(x); //~ ERROR [] storage differs: expected 3 but found 4 diff --git a/src/test/compile-fail/issue-4517.rs b/src/test/compile-fail/issue-4517.rs index 18caaa697a1..23cfeecc520 100644 --- a/src/test/compile-fail/issue-4517.rs +++ b/src/test/compile-fail/issue-4517.rs @@ -1,6 +1,6 @@ fn bar(int_param: int) {} fn main() { - let foo: [u8 * 4] = [1u8, ..4u8]; + let foo: [u8, ..4] = [1u8, ..4u8]; bar(foo); //~ ERROR mismatched types: expected `int` but found `[u8 * 4]` (expected int but found vector) } diff --git a/src/test/run-pass/const-autoderef.rs b/src/test/run-pass/const-autoderef.rs index fa482c38d14..572b961b2f8 100644 --- a/src/test/run-pass/const-autoderef.rs +++ b/src/test/run-pass/const-autoderef.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -static A: [u8 * 1] = ['h' as u8]; +static A: [u8, ..1] = ['h' as u8]; static B: u8 = (&A)[0]; -static C: &'static &'static &'static &'static [u8 * 1] = & & & &A; +static C: &'static &'static &'static &'static [u8, ..1] = & & & &A; static D: u8 = (&C)[0]; pub fn main() { diff --git a/src/test/run-pass/const-enum-vector.rs b/src/test/run-pass/const-enum-vector.rs index db7982c451f..0e92694dde8 100644 --- a/src/test/run-pass/const-enum-vector.rs +++ b/src/test/run-pass/const-enum-vector.rs @@ -9,7 +9,7 @@ // except according to those terms. enum E { V1(int), V0 } -static C: [E * 3] = [V0, V1(0xDEADBEE), V0]; +static C: [E, ..3] = [V0, V1(0xDEADBEE), V0]; pub fn main() { match C[1] { diff --git a/src/test/run-pass/const-expr-in-fixed-length-vec.rs b/src/test/run-pass/const-expr-in-fixed-length-vec.rs index 69585c9d31c..dc97c582219 100644 --- a/src/test/run-pass/const-expr-in-fixed-length-vec.rs +++ b/src/test/run-pass/const-expr-in-fixed-length-vec.rs @@ -14,6 +14,6 @@ fn main() { static FOO: int = 2; - let _v: [int * FOO*3]; + let _v: [int, ..FOO*3]; } diff --git a/src/test/run-pass/const-fields-and-indexing.rs b/src/test/run-pass/const-fields-and-indexing.rs index a3611c5eb26..658b39509bf 100644 --- a/src/test/run-pass/const-fields-and-indexing.rs +++ b/src/test/run-pass/const-fields-and-indexing.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -static x : [int * 4] = [1,2,3,4]; +static x : [int, ..4] = [1,2,3,4]; static p : int = x[2]; static y : &'static [int] = &[1,2,3,4]; static q : int = y[2]; diff --git a/src/test/run-pass/const-region-ptrs-noncopy.rs b/src/test/run-pass/const-region-ptrs-noncopy.rs index 23d1d63f189..46f9fdb0821 100644 --- a/src/test/run-pass/const-region-ptrs-noncopy.rs +++ b/src/test/run-pass/const-region-ptrs-noncopy.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -type Big = [u64 * 8]; +type Big = [u64, ..8]; struct Pair { a: int, b: &'self Big } static x: &'static Big = &([13, 14, 10, 13, 11, 14, 14, 15]); static y: &'static Pair<'static> = &Pair {a: 15, b: x}; diff --git a/src/test/run-pass/const-str-ptr.rs b/src/test/run-pass/const-str-ptr.rs index 2560431b532..1f40c57d851 100644 --- a/src/test/run-pass/const-str-ptr.rs +++ b/src/test/run-pass/const-str-ptr.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -static a: [u8 * 3] = ['h' as u8, 'i' as u8, 0 as u8]; -static c: &'static [u8 * 3] = &a; +static a: [u8, ..3] = ['h' as u8, 'i' as u8, 0 as u8]; +static c: &'static [u8, ..3] = &a; static b: *u8 = c as *u8; fn main() { diff --git a/src/test/run-pass/const-vecs-and-slices.rs b/src/test/run-pass/const-vecs-and-slices.rs index 736335464b2..f99f2c17ca5 100644 --- a/src/test/run-pass/const-vecs-and-slices.rs +++ b/src/test/run-pass/const-vecs-and-slices.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -static x : [int * 4] = [1,2,3,4]; +static x : [int, ..4] = [1,2,3,4]; static y : &'static [int] = &[1,2,3,4]; pub fn main() { diff --git a/src/test/run-pass/evec-internal-boxes.rs b/src/test/run-pass/evec-internal-boxes.rs index 657a8810897..ec5c5f01e15 100644 --- a/src/test/run-pass/evec-internal-boxes.rs +++ b/src/test/run-pass/evec-internal-boxes.rs @@ -9,8 +9,8 @@ // except according to those terms. pub fn main() { - let x : [@int * 5] = [@1,@2,@3,@4,@5]; - let _y : [@int * 5] = [@1,@2,@3,@4,@5]; + let x : [@int, ..5] = [@1,@2,@3,@4,@5]; + let _y : [@int, ..5] = [@1,@2,@3,@4,@5]; let mut z = [@1,@2,@3,@4,@5]; z = x; fail_unless!(*z[0] == 1); diff --git a/src/test/run-pass/evec-internal.rs b/src/test/run-pass/evec-internal.rs index 937912e7baf..1c23d5ac810 100644 --- a/src/test/run-pass/evec-internal.rs +++ b/src/test/run-pass/evec-internal.rs @@ -14,16 +14,16 @@ // Doesn't work; needs a design decision. pub fn main() { - let x : [int * 5] = [1,2,3,4,5]; - let _y : [int * 5] = [1,2,3,4,5]; + let x : [int, ..5] = [1,2,3,4,5]; + let _y : [int, ..5] = [1,2,3,4,5]; let mut z = [1,2,3,4,5]; z = x; fail_unless!(z[0] == 1); fail_unless!(z[4] == 5); - let a : [int * 5] = [1,1,1,1,1]; - let b : [int * 5] = [2,2,2,2,2]; - let c : [int * 5] = [2,2,2,2,3]; + let a : [int, ..5] = [1,1,1,1,1]; + let b : [int, ..5] = [2,2,2,2,2]; + let c : [int, ..5] = [2,2,2,2,3]; log(debug, a); diff --git a/src/test/run-pass/fixed_length_vec_glue.rs b/src/test/run-pass/fixed_length_vec_glue.rs index 87fdbf071d2..a8752f444bf 100644 --- a/src/test/run-pass/fixed_length_vec_glue.rs +++ b/src/test/run-pass/fixed_length_vec_glue.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -struct Struc { a: u8, b: [int * 3], c: int } +struct Struc { a: u8, b: [int, ..3], c: int } pub fn main() { let arr = [1,2,3]; diff --git a/src/test/run-pass/issue-3656.rs b/src/test/run-pass/issue-3656.rs index edb9278781f..b59810fc188 100644 --- a/src/test/run-pass/issue-3656.rs +++ b/src/test/run-pass/issue-3656.rs @@ -16,7 +16,7 @@ use core::libc::*; struct KEYGEN { - hash_algorithm: [c_uint * 2], + hash_algorithm: [c_uint, ..2], count: uint32_t, salt: *c_void, salt_size: uint32_t, diff --git a/src/test/run-pass/region-dependent-addr-of.rs b/src/test/run-pass/region-dependent-addr-of.rs index 6cad8c74592..982515b6121 100644 --- a/src/test/run-pass/region-dependent-addr-of.rs +++ b/src/test/run-pass/region-dependent-addr-of.rs @@ -14,7 +14,7 @@ struct A { struct B { v1: int, - v2: [int * 3], + v2: [int, ..3], v3: ~[int], v4: C, v5: ~C, diff --git a/src/test/run-pass/vec-fixed-length.rs b/src/test/run-pass/vec-fixed-length.rs index 5d0620be28c..5ce1b04dbe9 100644 --- a/src/test/run-pass/vec-fixed-length.rs +++ b/src/test/run-pass/vec-fixed-length.rs @@ -9,7 +9,7 @@ // except according to those terms. pub fn main() { - let x: [int*4] = [1, 2, 3, 4]; + let x: [int, ..4] = [1, 2, 3, 4]; io::println(fmt!("%d", x[0])); }