]> git.lizzy.rs Git - rust.git/commitdiff
Fallout - change array syntax to use `;`
authorNick Cameron <ncameron@mozilla.com>
Tue, 30 Dec 2014 08:19:41 +0000 (21:19 +1300)
committerNick Cameron <ncameron@mozilla.com>
Thu, 1 Jan 2015 21:28:19 +0000 (10:28 +1300)
66 files changed:
src/doc/guide.md
src/doc/reference.md
src/libcollections/dlist.rs
src/libcollections/slice.rs
src/libcollections/str.rs
src/libcollections/string.rs
src/libcore/fmt/float.rs
src/libcore/fmt/mod.rs
src/libcore/fmt/num.rs
src/libcore/hash/sip.rs
src/libcore/iter.rs
src/libcore/str/mod.rs
src/libcoretest/any.rs
src/libcoretest/char.rs
src/libcoretest/hash/sip.rs
src/libcoretest/iter.rs
src/libcoretest/ptr.rs
src/liblibc/lib.rs
src/liblog/directive.rs
src/librand/chacha.rs
src/librbml/lib.rs
src/librustc/middle/expr_use_visitor.rs
src/librustc/middle/graph.rs
src/librustc/middle/subst.rs
src/librustc_back/sha2.rs
src/librustc_borrowck/borrowck/doc.rs
src/librustc_typeck/check/method/doc.rs
src/librustc_typeck/check/mod.rs
src/librustc_typeck/variance.rs
src/librustdoc/html/markdown.rs
src/libserialize/base64.rs
src/libserialize/json.rs
src/libstd/ascii.rs
src/libstd/io/buffered.rs
src/libstd/io/comm_adapters.rs
src/libstd/io/extensions.rs
src/libstd/io/fs.rs
src/libstd/io/mem.rs
src/libstd/io/mod.rs
src/libstd/io/net/ip.rs
src/libstd/io/net/tcp.rs
src/libstd/io/net/udp.rs
src/libstd/io/pipe.rs
src/libstd/io/test.rs
src/libstd/io/util.rs
src/libstd/num/strconv.rs
src/libstd/num/uint_macros.rs
src/libstd/rand/os.rs
src/libstd/rt/util.rs
src/libstd/sys/unix/backtrace.rs
src/libstd/sys/unix/c.rs
src/libstd/sys/unix/fs.rs
src/libstd/sys/unix/os.rs
src/libstd/sys/unix/process.rs
src/libstd/sys/unix/stack_overflow.rs
src/libstd/sys/unix/sync.rs
src/libstd/sys/windows/backtrace.rs
src/libstd/sys/windows/os.rs
src/libsyntax/parse/parser.rs
src/libterm/terminfo/parm.rs
src/libterm/win.rs
src/libtest/lib.rs
src/libunicode/u_str.rs
src/test/pretty/issue-4264.rs
src/test/run-pass/enum-null-pointer-opt.rs
src/test/run-pass/type-sizes.rs

index fe65f4bd7f53d1277223187511e06ff1ac2d6860..289587b9ded1ed9eac55f8ce60097be427cf1b32 100644 (file)
@@ -1606,15 +1606,15 @@ things. The most basic is the **array**, a fixed-size list of elements of the
 same type. By default, arrays are immutable.
 
 ```{rust}
-let a = [1i, 2i, 3i];     // a: [int, ..3]
-let mut m = [1i, 2i, 3i]; // mut m: [int, ..3]
+let a = [1i, 2i, 3i];     // a: [int3]
+let mut m = [1i, 2i, 3i]; // mut m: [int3]
 ```
 
 There's a shorthand for initializing each element of an array to the same
 value. In this example, each element of `a` will be initialized to `0i`:
 
 ```{rust}
-let a = [0i, ..20]; // a: [int, ..20]
+let a = [0i; 20]; // a: [int; 20]
 ```
 
 Arrays have type `[T,..N]`. We'll talk about this `T` notation later, when we
index 94c76aaa69518aa37f461c9156d0427bbb64791a..f3ad19bbd2a6c038cdb2b2ea3ff730a054035cb4 100644 (file)
@@ -1438,11 +1438,11 @@ the `static` lifetime, fixed-size arrays, tuples, enum variants, and structs.
 const BIT1: uint = 1 << 0;
 const BIT2: uint = 1 << 1;
 
-const BITS: [uint, ..2] = [BIT1, BIT2];
+const BITS: [uint2] = [BIT1, BIT2];
 const STRING: &'static str = "bitstring";
 
 struct BitsNStrings<'a> {
-    mybits: [uint, ..2],
+    mybits: [uint2],
     mystring: &'a str
 }
 
@@ -2923,7 +2923,7 @@ constant expression that can be evaluated at compile time, such as a
 ```
 [1i, 2, 3, 4];
 ["a", "b", "c", "d"];
-[0i, ..128];             // array with 128 zeros
+[0i128];             // array with 128 zeros
 [0u8, 0u8, 0u8, 0u8];
 ```
 
@@ -3691,7 +3691,7 @@ An example of each kind:
 
 ```{rust}
 let vec: Vec<int>  = vec![1, 2, 3];
-let arr: [int, ..3] = [1, 2, 3];
+let arr: [int3] = [1, 2, 3];
 let s: &[int]      = vec.as_slice();
 ```
 
index 82dabedd871a4c9648f9fd07b0f4ee08a9b99b45..c4ebf436c972903c328aafdc841d78a88289481b 100644 (file)
@@ -1322,7 +1322,7 @@ fn fuzz_test(sz: int) {
 
     #[bench]
     fn bench_collect_into(b: &mut test::Bencher) {
-        let v = &[0i, ..64];
+        let v = &[0i64];
         b.iter(|| {
             let _: DList<int> = v.iter().map(|x| *x).collect();
         })
@@ -1384,7 +1384,7 @@ fn bench_rotate_backward(b: &mut test::Bencher) {
 
     #[bench]
     fn bench_iter(b: &mut test::Bencher) {
-        let v = &[0i, ..128];
+        let v = &[0i128];
         let m: DList<int> = v.iter().map(|&x|x).collect();
         b.iter(|| {
             assert!(m.iter().count() == 128);
@@ -1392,7 +1392,7 @@ fn bench_iter(b: &mut test::Bencher) {
     }
     #[bench]
     fn bench_iter_mut(b: &mut test::Bencher) {
-        let v = &[0i, ..128];
+        let v = &[0i128];
         let mut m: DList<int> = v.iter().map(|&x|x).collect();
         b.iter(|| {
             assert!(m.iter_mut().count() == 128);
@@ -1400,7 +1400,7 @@ fn bench_iter_mut(b: &mut test::Bencher) {
     }
     #[bench]
     fn bench_iter_rev(b: &mut test::Bencher) {
-        let v = &[0i, ..128];
+        let v = &[0i128];
         let m: DList<int> = v.iter().map(|&x|x).collect();
         b.iter(|| {
             assert!(m.iter().rev().count() == 128);
@@ -1408,7 +1408,7 @@ fn bench_iter_rev(b: &mut test::Bencher) {
     }
     #[bench]
     fn bench_iter_mut_rev(b: &mut test::Bencher) {
-        let v = &[0i, ..128];
+        let v = &[0i128];
         let mut m: DList<int> = v.iter().map(|&x|x).collect();
         b.iter(|| {
             assert!(m.iter_mut().rev().count() == 128);
index 02b70c0f169d88e9fdc39ea7e85f828b773c5d11..5f72fc696394ca7fe1c1aba977e29a2da9e358a4 100644 (file)
@@ -861,6 +861,7 @@ pub trait CloneSliceExt<T> for Sized? {
     fn clone_from_slice(&mut self, &[T]) -> uint;
 }
 
+
 #[unstable = "trait is unstable"]
 impl<T: Clone> CloneSliceExt<T> for [T] {
     /// Returns a copy of `v`.
@@ -1482,14 +1483,14 @@ fn test_from_elem() {
 
     #[test]
     fn test_is_empty() {
-        let xs: [int, ..0] = [];
+        let xs: [int0] = [];
         assert!(xs.is_empty());
         assert!(![0i].is_empty());
     }
 
     #[test]
     fn test_len_divzero() {
-        type Z = [i8, ..0];
+        type Z = [i80];
         let v0 : &[Z] = &[];
         let v1 : &[Z] = &[[]];
         let v2 : &[Z] = &[[], []];
@@ -1856,7 +1857,7 @@ fn test_element_swaps() {
     #[test]
     fn test_permutations() {
         {
-            let v: [int, ..0] = [];
+            let v: [int0] = [];
             let mut it = v.permutations();
             let (min_size, max_opt) = it.size_hint();
             assert_eq!(min_size, 1);
@@ -2116,28 +2117,28 @@ fn test_partitioned() {
 
     #[test]
     fn test_concat() {
-        let v: [Vec<int>, ..0] = [];
+        let v: [Vec<int>0] = [];
         let c: Vec<int> = v.concat();
         assert_eq!(c, []);
         let d: Vec<int> = [vec![1i], vec![2i,3i]].concat();
         assert_eq!(d, vec![1i, 2, 3]);
 
-        let v: [&[int], ..2] = [&[1], &[2, 3]];
+        let v: [&[int]2] = [&[1], &[2, 3]];
         assert_eq!(v.connect(&0), vec![1i, 0, 2, 3]);
-        let v: [&[int], ..3] = [&[1i], &[2], &[3]];
+        let v: [&[int]3] = [&[1i], &[2], &[3]];
         assert_eq!(v.connect(&0), vec![1i, 0, 2, 0, 3]);
     }
 
     #[test]
     fn test_connect() {
-        let v: [Vec<int>, ..0] = [];
+        let v: [Vec<int>0] = [];
         assert_eq!(v.connect_vec(&0), vec![]);
         assert_eq!([vec![1i], vec![2i, 3]].connect_vec(&0), vec![1, 0, 2, 3]);
         assert_eq!([vec![1i], vec![2i], vec![3i]].connect_vec(&0), vec![1, 0, 2, 0, 3]);
 
-        let v: [&[int], ..2] = [&[1], &[2, 3]];
+        let v: [&[int]2] = [&[1], &[2, 3]];
         assert_eq!(v.connect_vec(&0), vec![1, 0, 2, 3]);
-        let v: [&[int], ..3] = [&[1], &[2], &[3]];
+        let v: [&[int]3] = [&[1], &[2], &[3]];
         assert_eq!(v.connect_vec(&0), vec![1, 0, 2, 0, 3]);
     }
 
@@ -2710,7 +2711,7 @@ fn test_iter_zero_sized() {
         }
         assert_eq!(cnt, 11);
 
-        let xs: [Foo, ..3] = [Foo, Foo, Foo];
+        let xs: [Foo3] = [Foo, Foo, Foo];
         cnt = 0;
         for f in xs.iter() {
             assert!(*f == Foo);
index e5aa377b27546be34282faf5498871eeebf4fa2b..7caeb563db724bb4763031a9fbee36a03873d7ec 100644 (file)
@@ -2517,7 +2517,7 @@ fn test_rev_iterator() {
 
     #[test]
     fn test_chars_decoding() {
-        let mut bytes = [0u8, ..4];
+        let mut bytes = [0u84];
         for c in range(0u32, 0x110000).filter_map(|c| ::core::char::from_u32(c)) {
             let len = c.encode_utf8(&mut bytes).unwrap_or(0);
             let s = ::core::str::from_utf8(bytes[..len]).unwrap();
@@ -2529,7 +2529,7 @@ fn test_chars_decoding() {
 
     #[test]
     fn test_chars_rev_decoding() {
-        let mut bytes = [0u8, ..4];
+        let mut bytes = [0u84];
         for c in range(0u32, 0x110000).filter_map(|c| ::core::char::from_u32(c)) {
             let len = c.encode_utf8(&mut bytes).unwrap_or(0);
             let s = ::core::str::from_utf8(bytes[..len]).unwrap();
index f703ff99660c6ae4691119ad4d830d8b530f0300..37a6e690f5d30ee5688931da70761286a34b67a7 100644 (file)
@@ -675,7 +675,7 @@ pub fn insert(&mut self, idx: uint, ch: char) {
         assert!(idx <= len);
         assert!(self.is_char_boundary(idx));
         self.vec.reserve(4);
-        let mut bits = [0, ..4];
+        let mut bits = [04];
         let amt = ch.encode_utf8(&mut bits).unwrap();
 
         unsafe {
index d3b1d8efe8bfc889f06d6ee4993c7a59ee6da071..e1728d762ed10ac97344ea723522f81ac9fcf9f7 100644 (file)
@@ -123,7 +123,7 @@ pub fn float_to_str_bytes_common<T: Float, U, F>(
     // For an f64 the exponent is in the range of [-1022, 1023] for base 2, so
     // we may have up to that many digits. Give ourselves some extra wiggle room
     // otherwise as well.
-    let mut buf = [0u8, ..1536];
+    let mut buf = [0u81536];
     let mut end = 0;
     let radix_gen: T = cast(radix as int).unwrap();
 
index 95753f4b671d5c24480e02b6c34437920f4c7095..87fcb12e29f9c95ddc442e94899f7f1dd7d47890 100644 (file)
@@ -400,7 +400,7 @@ pub fn pad_integral(&mut self,
         // Writes the sign if it exists, and then the prefix if it was requested
         let write_prefix = |&: f: &mut Formatter| {
             for c in sign.into_iter() {
-                let mut b = [0, ..4];
+                let mut b = [04];
                 let n = c.encode_utf8(&mut b).unwrap_or(0);
                 try!(f.buf.write(b[..n]));
             }
@@ -505,7 +505,7 @@ fn with_padding<F>(&mut self, padding: uint, default: rt::Alignment, f: F) -> Re
             rt::AlignCenter => (padding / 2, (padding + 1) / 2),
         };
 
-        let mut fill = [0u8, ..4];
+        let mut fill = [0u84];
         let len = self.fill.encode_utf8(&mut fill).unwrap_or(0);
 
         for _ in range(0, pre_pad) {
@@ -606,7 +606,7 @@ impl Show for char {
     fn fmt(&self, f: &mut Formatter) -> Result {
         use char::Char;
 
-        let mut utf8 = [0u8, ..4];
+        let mut utf8 = [0u84];
         let amt = self.encode_utf8(&mut utf8).unwrap_or(0);
         let s: &str = unsafe { mem::transmute(utf8[..amt]) };
         Show::fmt(s, f)
index cd8f226172a66e49ecbd1b0b3d398dbf29f992cb..7de3e847dc68350986086c7e5c4e2b4814967741 100644 (file)
@@ -37,7 +37,7 @@ fn fmt_int<T: Int>(&self, mut x: T, f: &mut fmt::Formatter) -> fmt::Result {
         // characters for a base 2 number.
         let zero = Int::zero();
         let is_positive = x >= zero;
-        let mut buf = [0u8, ..64];
+        let mut buf = [0u864];
         let mut curr = buf.len();
         let base = cast(self.base()).unwrap();
         if is_positive {
index ab6b0986c686df72b92a04b0aa93a2faa7d06cf6..51c0827186d51eed097baf04ac83a2c2002df328 100644 (file)
@@ -292,7 +292,7 @@ fn hash(&self, state: &mut S) {
     #[test]
     #[allow(unused_must_use)]
     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, ],
@@ -366,7 +366,7 @@ fn test_siphash() {
         let mut state_inc = SipState::new_with_keys(k0, k1);
         let mut state_full = SipState::new_with_keys(k0, k1);
 
-        fn to_hex_str(r: &[u8, ..8]) -> String {
+        fn to_hex_str(r: &[u88]) -> String {
             let mut s = String::new();
             for b in r.iter() {
                 s.push_str(format!("{}", fmt::radix(*b, 16)).as_slice());
index b0fd52896fe5726b078dba2e63b0162e454fa348..7c53503b1ceb7ef4688756c9f74642c8c8914df3 100644 (file)
@@ -1037,7 +1037,7 @@ pub trait IteratorOrdExt<A> {
     /// ```rust
     /// use std::iter::{NoElements, OneElement, MinMax};
     ///
-    /// let v: [int, ..0] = [];
+    /// let v: [int0] = [];
     /// assert_eq!(v.iter().min_max(), NoElements);
     ///
     /// let v = [1i];
index 59cf79408b100acb837ee39cae95012a366d0250..f4fe86a0d7ec08c1a7aea723a20e68666ff64370 100644 (file)
@@ -1027,7 +1027,7 @@ pub fn truncate_utf16_at_nul<'a>(v: &'a [u16]) -> &'a [u16] {
 }
 
 // https://tools.ietf.org/html/rfc3629
-static UTF8_CHAR_WIDTH: [u8, ..256] = [
+static UTF8_CHAR_WIDTH: [u8256] = [
 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // 0x1F
 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
index 7c832e90ed96bac6bcf18e6aaa92ecbdcd577134..e9e2028dc614775acd99f1ffbba443493546da04 100644 (file)
@@ -113,10 +113,10 @@ fn any_downcast_mut() {
 
 #[test]
 fn any_fixed_vec() {
-    let test = [0u, ..8];
+    let test = [0u8];
     let test = &test as &Any;
-    assert!(test.is::<[uint, ..8]>());
-    assert!(!test.is::<[uint, ..10]>());
+    assert!(test.is::<[uint8]>());
+    assert!(!test.is::<[uint10]>());
 }
 
 
index bed38f8c29666babdd7549f4b60fb17e7b10614f..b931809e6036ed184f090419fd17f257a89791a9 100644 (file)
@@ -169,7 +169,7 @@ fn string(c: char) -> String { c.escape_unicode().collect() }
 #[test]
 fn test_encode_utf8() {
     fn check(input: char, expect: &[u8]) {
-        let mut buf = [0u8, ..4];
+        let mut buf = [0u84];
         let n = input.encode_utf8(buf.as_mut_slice()).unwrap_or(0);
         assert_eq!(buf[..n], expect);
     }
@@ -183,7 +183,7 @@ fn check(input: char, expect: &[u8]) {
 #[test]
 fn test_encode_utf16() {
     fn check(input: char, expect: &[u16]) {
-        let mut buf = [0u16, ..2];
+        let mut buf = [0u162];
         let n = input.encode_utf16(buf.as_mut_slice()).unwrap_or(0);
         assert_eq!(buf[..n], expect);
     }
index 8801c2975c8f285feb95562eb573c9004e46c336..431f7e748f6db0e29a6bc4ea3bbc3dc5260cb423 100644 (file)
@@ -33,7 +33,7 @@ fn hash(&self, state: &mut S) {
 #[test]
 #[allow(unused_must_use)]
 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, ],
@@ -107,7 +107,7 @@ fn test_siphash() {
     let mut state_inc = SipState::new_with_keys(k0, k1);
     let mut state_full = SipState::new_with_keys(k0, k1);
 
-    fn to_hex_str(r: &[u8, ..8]) -> String {
+    fn to_hex_str(r: &[u88]) -> String {
         let mut s = String::new();
         for b in r.iter() {
             s.push_str(format!("{}", fmt::radix(*b, 16)).as_slice());
index dbbbaa5892cc4bd77b101479162d84235c703539..d450e557383a40fe6df3bd198d7ddc26031764ca 100644 (file)
@@ -19,7 +19,7 @@
 
 #[test]
 fn test_lt() {
-    let empty: [int, ..0] = [];
+    let empty: [int0] = [];
     let xs = [1i,2,3];
     let ys = [1i,2,0];
 
@@ -781,7 +781,7 @@ fn test_peekable_is_empty() {
 
 #[test]
 fn test_min_max() {
-    let v: [int, ..0] = [];
+    let v: [int0] = [];
     assert_eq!(v.iter().min_max(), NoElements);
 
     let v = [1i];
index db3580e5d0c4252aff037326eac8f7bd0ad6afd8..162f75763de429e8eef4fb5f82fc0c26797815f9 100644 (file)
@@ -165,8 +165,8 @@ fn test_ptr_subtraction() {
 
 #[test]
 fn test_set_memory() {
-    let mut xs = [0u8, ..20];
+    let mut xs = [0u820];
     let ptr = xs.as_mut_ptr();
     unsafe { set_memory(ptr, 5u8, xs.len()); }
-    assert!(xs == [5u8, ..20]);
+    assert!(xs == [5u820]);
 }
index 7dcdc08943fe191df8345af2fcaf557f80f3bee3..ad8895924f9596371e3a96d21c06b070444f1617 100644 (file)
@@ -425,20 +425,20 @@ pub mod bsd44 {
                 #[repr(C)]
                 #[deriving(Copy)] pub struct sockaddr {
                     pub sa_family: sa_family_t,
-                    pub sa_data: [u8, ..14],
+                    pub sa_data: [u814],
                 }
                 #[repr(C)]
                 #[deriving(Copy)] pub struct sockaddr_storage {
                     pub ss_family: sa_family_t,
                     pub __ss_align: i64,
-                    pub __ss_pad2: [u8, ..112],
+                    pub __ss_pad2: [u8112],
                 }
                 #[repr(C)]
                 #[deriving(Copy)] pub struct sockaddr_in {
                     pub sin_family: sa_family_t,
                     pub sin_port: in_port_t,
                     pub sin_addr: in_addr,
-                    pub sin_zero: [u8, ..8],
+                    pub sin_zero: [u88],
                 }
                 #[repr(C)]
                 #[deriving(Copy)] pub struct in_addr {
@@ -454,7 +454,7 @@ pub mod bsd44 {
                 }
                 #[repr(C)]
                 #[deriving(Copy)] pub struct in6_addr {
-                    pub s6_addr: [u16, ..8]
+                    pub s6_addr: [u168]
                 }
                 #[repr(C)]
                 #[deriving(Copy)] pub struct ip_mreq {
@@ -491,7 +491,7 @@ pub mod bsd44 {
                 #[repr(C)]
                 #[deriving(Copy)] pub struct sockaddr_un {
                     pub sun_family: sa_family_t,
-                    pub sun_path: [c_char, ..108]
+                    pub sun_path: [c_char108]
                 }
 
                 #[repr(C)]
@@ -609,7 +609,7 @@ pub mod posix01 {
 
                 #[repr(C)]
                 #[deriving(Copy)] pub struct pthread_attr_t {
-                    pub __size: [u32, ..9]
+                    pub __size: [u329]
                 }
             }
             #[cfg(target_arch = "arm")]
@@ -625,14 +625,14 @@ pub mod posix01 {
                 #[repr(C)]
                 #[deriving(Copy)] pub struct stat {
                     pub st_dev: c_ulonglong,
-                    pub __pad0: [c_uchar, ..4],
+                    pub __pad0: [c_uchar4],
                     pub __st_ino: ino_t,
                     pub st_mode: c_uint,
                     pub st_nlink: c_uint,
                     pub st_uid: uid_t,
                     pub st_gid: gid_t,
                     pub st_rdev: c_ulonglong,
-                    pub __pad3: [c_uchar, ..4],
+                    pub __pad3: [c_uchar4],
                     pub st_size: c_longlong,
                     pub st_blksize: blksize_t,
                     pub st_blocks: c_ulonglong,
@@ -653,7 +653,7 @@ pub mod posix01 {
 
                 #[repr(C)]
                 #[deriving(Copy)] pub struct pthread_attr_t {
-                    pub __size: [u32, ..9]
+                    pub __size: [u329]
                 }
             }
             #[cfg(any(target_arch = "mips", target_arch = "mipsel"))]
@@ -670,14 +670,14 @@ pub mod posix01 {
                 #[repr(C)]
                 #[deriving(Copy)] pub struct stat {
                     pub st_dev: c_ulong,
-                    pub st_pad1: [c_long, ..3],
+                    pub st_pad1: [c_long3],
                     pub st_ino: ino_t,
                     pub st_mode: mode_t,
                     pub st_nlink: nlink_t,
                     pub st_uid: uid_t,
                     pub st_gid: gid_t,
                     pub st_rdev: c_ulong,
-                    pub st_pad2: [c_long, ..2],
+                    pub st_pad2: [c_long2],
                     pub st_size: off_t,
                     pub st_pad3: c_long,
                     pub st_atime: time_t,
@@ -688,7 +688,7 @@ pub mod posix01 {
                     pub st_ctime_nsec: c_long,
                     pub st_blksize: blksize_t,
                     pub st_blocks: blkcnt_t,
-                    pub st_pad5: [c_long, ..14],
+                    pub st_pad5: [c_long14],
                 }
 
                 #[repr(C)]
@@ -699,7 +699,7 @@ pub mod posix01 {
 
                 #[repr(C)]
                 #[deriving(Copy)] pub struct pthread_attr_t {
-                    pub __size: [u32, ..9]
+                    pub __size: [u329]
                 }
             }
             pub mod posix08 {}
@@ -714,7 +714,7 @@ pub mod extra {
                     pub sll_hatype: c_ushort,
                     pub sll_pkttype: c_uchar,
                     pub sll_halen: c_uchar,
-                    pub sll_addr: [c_uchar, ..8]
+                    pub sll_addr: [c_uchar8]
                 }
             }
 
@@ -788,7 +788,7 @@ pub mod posix01 {
                     pub st_mtime_nsec: c_long,
                     pub st_ctime: time_t,
                     pub st_ctime_nsec: c_long,
-                    pub __unused: [c_long, ..3],
+                    pub __unused: [c_long3],
                 }
 
                 #[repr(C)]
@@ -799,7 +799,7 @@ pub mod posix01 {
 
                 #[repr(C)]
                 #[deriving(Copy)] pub struct pthread_attr_t {
-                    pub __size: [u64, ..7]
+                    pub __size: [u647]
                 }
             }
             pub mod posix08 {
@@ -815,7 +815,7 @@ pub mod extra {
                     pub sll_hatype: c_ushort,
                     pub sll_pkttype: c_uchar,
                     pub sll_halen: c_uchar,
-                    pub sll_addr: [c_uchar, ..8]
+                    pub sll_addr: [c_uchar8]
                 }
 
             }
@@ -878,15 +878,15 @@ pub mod bsd44 {
                 #[deriving(Copy)] pub struct sockaddr {
                     pub sa_len: u8,
                     pub sa_family: sa_family_t,
-                    pub sa_data: [u8, ..14],
+                    pub sa_data: [u814],
                 }
                 #[repr(C)]
                 #[deriving(Copy)] pub struct sockaddr_storage {
                     pub ss_len: u8,
                     pub ss_family: sa_family_t,
-                    pub __ss_pad1: [u8, ..6],
+                    pub __ss_pad1: [u86],
                     pub __ss_align: i64,
-                    pub __ss_pad2: [u8, ..112],
+                    pub __ss_pad2: [u8112],
                 }
                 #[repr(C)]
                 #[deriving(Copy)] pub struct sockaddr_in {
@@ -894,7 +894,7 @@ pub mod bsd44 {
                     pub sin_family: sa_family_t,
                     pub sin_port: in_port_t,
                     pub sin_addr: in_addr,
-                    pub sin_zero: [u8, ..8],
+                    pub sin_zero: [u88],
                 }
                 #[repr(C)]
                 #[deriving(Copy)] pub struct in_addr {
@@ -911,7 +911,7 @@ pub mod bsd44 {
                 }
                 #[repr(C)]
                 #[deriving(Copy)] pub struct in6_addr {
-                    pub s6_addr: [u16, ..8]
+                    pub s6_addr: [u168]
                 }
                 #[repr(C)]
                 #[deriving(Copy)] pub struct ip_mreq {
@@ -938,7 +938,7 @@ pub mod bsd44 {
                 #[deriving(Copy)] pub struct sockaddr_un {
                     pub sun_len: u8,
                     pub sun_family: sa_family_t,
-                    pub sun_path: [c_char, ..104]
+                    pub sun_path: [c_char104]
                 }
                 #[repr(C)]
                 #[deriving(Copy)] pub struct ifaddrs {
@@ -1030,7 +1030,7 @@ pub mod posix01 {
                     pub st_lspare: int32_t,
                     pub st_birthtime: time_t,
                     pub st_birthtime_nsec: c_long,
-                    pub __unused: [uint8_t, ..2],
+                    pub __unused: [uint8_t2],
                 }
 
                 #[repr(C)]
@@ -1106,15 +1106,15 @@ pub mod bsd44 {
                 #[deriving(Copy)] pub struct sockaddr {
                     pub sa_len: u8,
                     pub sa_family: sa_family_t,
-                    pub sa_data: [u8, ..14],
+                    pub sa_data: [u814],
                 }
                 #[repr(C)]
                 #[deriving(Copy)] pub struct sockaddr_storage {
                     pub ss_len: u8,
                     pub ss_family: sa_family_t,
-                    pub __ss_pad1: [u8, ..6],
+                    pub __ss_pad1: [u86],
                     pub __ss_align: i64,
-                    pub __ss_pad2: [u8, ..112],
+                    pub __ss_pad2: [u8112],
                 }
                 #[repr(C)]
                 #[deriving(Copy)] pub struct sockaddr_in {
@@ -1122,7 +1122,7 @@ pub mod bsd44 {
                     pub sin_family: sa_family_t,
                     pub sin_port: in_port_t,
                     pub sin_addr: in_addr,
-                    pub sin_zero: [u8, ..8],
+                    pub sin_zero: [u88],
                 }
                 #[repr(C)]
                 #[deriving(Copy)] pub struct in_addr {
@@ -1139,7 +1139,7 @@ pub mod bsd44 {
                 }
                 #[repr(C)]
                 #[deriving(Copy)] pub struct in6_addr {
-                    pub s6_addr: [u16, ..8]
+                    pub s6_addr: [u168]
                 }
                 #[repr(C)]
                 #[deriving(Copy)] pub struct ip_mreq {
@@ -1166,7 +1166,7 @@ pub mod bsd44 {
                 #[deriving(Copy)] pub struct sockaddr_un {
                     pub sun_len: u8,
                     pub sun_family: sa_family_t,
-                    pub sun_path: [c_char, ..104]
+                    pub sun_path: [c_char104]
                 }
                 #[repr(C)]
                 #[deriving(Copy)] pub struct ifaddrs {
@@ -1337,21 +1337,21 @@ pub mod bsd44 {
                 #[repr(C)]
                 #[deriving(Copy)] pub struct sockaddr {
                     pub sa_family: sa_family_t,
-                    pub sa_data: [u8, ..14],
+                    pub sa_data: [u814],
                 }
                 #[repr(C)]
                 #[deriving(Copy)] pub struct sockaddr_storage {
                     pub ss_family: sa_family_t,
-                    pub __ss_pad1: [u8, ..6],
+                    pub __ss_pad1: [u86],
                     pub __ss_align: i64,
-                    pub __ss_pad2: [u8, ..112],
+                    pub __ss_pad2: [u8112],
                 }
                 #[repr(C)]
                 #[deriving(Copy)] pub struct sockaddr_in {
                     pub sin_family: sa_family_t,
                     pub sin_port: in_port_t,
                     pub sin_addr: in_addr,
-                    pub sin_zero: [u8, ..8],
+                    pub sin_zero: [u88],
                 }
                 #[repr(C)]
                 #[deriving(Copy)] pub struct in_addr {
@@ -1367,7 +1367,7 @@ pub mod bsd44 {
                 }
                 #[repr(C)]
                 #[deriving(Copy)] pub struct in6_addr {
-                    pub s6_addr: [u16, ..8]
+                    pub s6_addr: [u168]
                 }
                 #[repr(C)]
                 #[deriving(Copy)] pub struct ip_mreq {
@@ -1393,7 +1393,7 @@ pub mod bsd44 {
                 #[repr(C)]
                 #[deriving(Copy)] pub struct sockaddr_un {
                     pub sun_family: sa_family_t,
-                    pub sun_path: [c_char, ..108]
+                    pub sun_path: [c_char108]
                 }
             }
         }
@@ -1626,7 +1626,7 @@ pub mod extra {
                     pub Data1: DWORD,
                     pub Data2: WORD,
                     pub Data3: WORD,
-                    pub Data4: [BYTE, ..8],
+                    pub Data4: [BYTE8],
                 }
 
                 #[repr(C)]
@@ -1675,8 +1675,8 @@ pub mod extra {
                     pub nFileSizeLow: DWORD,
                     pub dwReserved0: DWORD,
                     pub dwReserved1: DWORD,
-                    pub cFileName: [wchar_t, ..260], // #define MAX_PATH 260
-                    pub cAlternateFileName: [wchar_t, ..14],
+                    pub cFileName: [wchar_t260], // #define MAX_PATH 260
+                    pub cAlternateFileName: [wchar_t14],
                 }
 
                 pub type LPWIN32_FIND_DATAW = *mut WIN32_FIND_DATAW;
@@ -1741,16 +1741,16 @@ pub mod bsd44 {
                 #[deriving(Copy)] pub struct sockaddr {
                     pub sa_len: u8,
                     pub sa_family: sa_family_t,
-                    pub sa_data: [u8, ..14],
+                    pub sa_data: [u814],
                 }
 
                 #[repr(C)]
                 #[deriving(Copy)] pub struct sockaddr_storage {
                     pub ss_len: u8,
                     pub ss_family: sa_family_t,
-                    pub __ss_pad1: [u8, ..6],
+                    pub __ss_pad1: [u86],
                     pub __ss_align: i64,
-                    pub __ss_pad2: [u8, ..112],
+                    pub __ss_pad2: [u8112],
                 }
 
                 #[repr(C)]
@@ -1759,7 +1759,7 @@ pub mod bsd44 {
                     pub sin_family: sa_family_t,
                     pub sin_port: in_port_t,
                     pub sin_addr: in_addr,
-                    pub sin_zero: [u8, ..8],
+                    pub sin_zero: [u88],
                 }
 
                 #[repr(C)]
@@ -1779,7 +1779,7 @@ pub mod bsd44 {
 
                 #[repr(C)]
                 #[deriving(Copy)] pub struct in6_addr {
-                    pub s6_addr: [u16, ..8]
+                    pub s6_addr: [u168]
                 }
 
                 #[repr(C)]
@@ -1810,7 +1810,7 @@ pub mod bsd44 {
                 #[deriving(Copy)] pub struct sockaddr_un {
                     pub sun_len: u8,
                     pub sun_family: sa_family_t,
-                    pub sun_path: [c_char, ..104]
+                    pub sun_path: [c_char104]
                 }
 
                 #[repr(C)]
@@ -1899,7 +1899,7 @@ pub mod posix01 {
                     pub st_flags: uint32_t,
                     pub st_gen: uint32_t,
                     pub st_lspare: int32_t,
-                    pub st_qspare: [int64_t, ..2],
+                    pub st_qspare: [int64_t2],
                 }
 
                 #[repr(C)]
@@ -1911,7 +1911,7 @@ pub mod posix01 {
                 #[repr(C)]
                 #[deriving(Copy)] pub struct pthread_attr_t {
                     pub __sig: c_long,
-                    pub __opaque: [c_char, ..36]
+                    pub __opaque: [c_char36]
                 }
             }
             pub mod posix08 {
@@ -2003,7 +2003,7 @@ pub mod posix01 {
                     pub st_flags: uint32_t,
                     pub st_gen: uint32_t,
                     pub st_lspare: int32_t,
-                    pub st_qspare: [int64_t, ..2],
+                    pub st_qspare: [int64_t2],
                 }
 
                 #[repr(C)]
@@ -2015,7 +2015,7 @@ pub mod posix01 {
                 #[repr(C)]
                 #[deriving(Copy)] pub struct pthread_attr_t {
                     pub __sig: c_long,
-                    pub __opaque: [c_char, ..56]
+                    pub __opaque: [c_char56]
                 }
             }
             pub mod posix08 {
index 2b25a64affee313ad36a9904e5818ae49e423826..7e21f5f48f16389b9b8d8d45f919d44c933d393f 100644 (file)
@@ -18,7 +18,7 @@ pub struct LogDirective {
     pub level: u32,
 }
 
-pub static LOG_LEVEL_NAMES: [&'static str, ..4] = ["ERROR", "WARN", "INFO",
+pub static LOG_LEVEL_NAMES: [&'static str4] = ["ERROR", "WARN", "INFO",
                                                "DEBUG"];
 
 /// Parse an individual log level that is either a number or a symbolic log level
index 6fc92e1e94fcbdcbbedbf74b2e326b50bf8dff99..0cf9ce851085ff8c381c458c641889d09ab03ae2 100644 (file)
@@ -246,7 +246,7 @@ fn test_rng_reseed() {
     fn test_rng_true_values() {
         // Test vectors 1 and 2 from
         // http://tools.ietf.org/html/draft-nir-cfrg-chacha20-poly1305-04
-        let seed : &[_] = &[0u32, ..8];
+        let seed : &[_] = &[0u328];
         let mut ra: ChaChaRng = SeedableRng::from_seed(seed);
 
         let v = Vec::from_fn(16, |_| ra.next_u32());
index 19e79b1eb7b2d4cf7bca0c6b7e91c023c81e7599..5bfe7e15a930764c25dfbb9a52cbff1ff0fea56a 100644 (file)
@@ -200,7 +200,7 @@ pub fn vuint_at(data: &[u8], start: uint) -> DecodeResult<Res> {
         // the most significant bit is set, the second most significant bit is set etc. we can
         // replace up to three "and+branch" with a single table lookup which gives us a measured
         // speedup of around 2x on x86_64.
-        static SHIFT_MASK_TABLE: [(uint, u32), ..16] = [
+        static SHIFT_MASK_TABLE: [(uint, u32)16] = [
             (0, 0x0), (0, 0x0fffffff),
             (8, 0x1fffff), (8, 0x1fffff),
             (16, 0x3fff), (16, 0x3fff), (16, 0x3fff), (16, 0x3fff),
index 059f38f0930d19aab5e3948e445306b693274900..1ebb18f976e4c247962397732ca2b84c9450fa0e 100644 (file)
@@ -1085,7 +1085,7 @@ fn walk_pat(&mut self,
                         // Note: We declare here that the borrow
                         // occurs upon entering the `[...]`
                         // pattern. This implies that something like
-                        // `[a, ..b]` where `a` is a move is illegal,
+                        // `[ab]` where `a` is a move is illegal,
                         // because the borrow is already in effect.
                         // In fact such a move would be safe-ish, but
                         // it effectively *requires* that we use the
index 06e6ef30f74dacadc64ff42e6d1f5e6a3443498d..da00d737b473e785aa807d5ecf6fe8155441b522 100644 (file)
@@ -42,12 +42,12 @@ pub struct Graph<N,E> {
 }
 
 pub struct Node<N> {
-    first_edge: [EdgeIndex, ..2], // see module comment
+    first_edge: [EdgeIndex2], // see module comment
     pub data: N,
 }
 
 pub struct Edge<E> {
-    next_edge: [EdgeIndex, ..2], // see module comment
+    next_edge: [EdgeIndex2], // see module comment
     source: NodeIndex,
     target: NodeIndex,
     pub data: E,
index 07da9853e558525d280845190bd51a345730bac9..3c5459ff3bc754cf19a7032e540359978c418d82 100644 (file)
@@ -188,7 +188,7 @@ pub enum ParamSpace {
 }
 
 impl ParamSpace {
-    pub fn all() -> [ParamSpace, ..3] {
+    pub fn all() -> [ParamSpace3] {
         [TypeSpace, SelfSpace, FnSpace]
     }
 
index 366e33d6384ba0888d805dae10cf8d7726c5021e..1e55f442fb9ac97df9d16266671836d80a75c15e 100644 (file)
@@ -111,7 +111,7 @@ fn input<F>(&mut self, input: &[u8], func: F) where
 
 /// A FixedBuffer of 64 bytes useful for implementing Sha256 which has a 64 byte blocksize.
 struct FixedBuffer64 {
-    buffer: [u8, ..64],
+    buffer: [u864],
     buffer_idx: uint,
 }
 
@@ -119,7 +119,7 @@ impl FixedBuffer64 {
     /// Create a new FixedBuffer64
     fn new() -> FixedBuffer64 {
         return FixedBuffer64 {
-            buffer: [0u8, ..64],
+            buffer: [0u864],
             buffer_idx: 0
         };
     }
@@ -284,7 +284,7 @@ struct Engine256State {
 }
 
 impl Engine256State {
-    fn new(h: &[u32, ..8]) -> Engine256State {
+    fn new(h: &[u328]) -> Engine256State {
         return Engine256State {
             h0: h[0],
             h1: h[1],
@@ -297,7 +297,7 @@ fn new(h: &[u32, ..8]) -> Engine256State {
         };
     }
 
-    fn reset(&mut self, h: &[u32, ..8]) {
+    fn reset(&mut self, h: &[u328]) {
         self.h0 = h[0];
         self.h1 = h[1];
         self.h2 = h[2];
@@ -342,7 +342,7 @@ fn sigma1(x: u32) -> u32 {
         let mut g = self.h6;
         let mut h = self.h7;
 
-        let mut w = [0u32, ..64];
+        let mut w = [0u3264];
 
         // Sha-512 and Sha-256 use basically the same calculations which are implemented
         // by these macros. Inlining the calculations seems to result in better generated code.
@@ -408,7 +408,7 @@ macro_rules! sha2_round(
     }
 }
 
-static K32: [u32, ..64] = [
+static K32: [u3264] = [
     0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
     0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
     0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
@@ -437,7 +437,7 @@ struct Engine256 {
 }
 
 impl Engine256 {
-    fn new(h: &[u32, ..8]) -> Engine256 {
+    fn new(h: &[u328]) -> Engine256 {
         return Engine256 {
             length_bits: 0,
             buffer: FixedBuffer64::new(),
@@ -446,7 +446,7 @@ fn new(h: &[u32, ..8]) -> Engine256 {
         }
     }
 
-    fn reset(&mut self, h: &[u32, ..8]) {
+    fn reset(&mut self, h: &[u328]) {
         self.length_bits = 0;
         self.buffer.reset();
         self.state.reset(h);
@@ -515,7 +515,7 @@ fn reset(&mut self) {
     fn output_bits(&self) -> uint { 256 }
 }
 
-static H256: [u32, ..8] = [
+static H256: [u328] = [
     0x6a09e667,
     0xbb67ae85,
     0x3c6ef372,
@@ -658,7 +658,7 @@ mod bench {
     #[bench]
     pub fn sha256_10(b: &mut Bencher) {
         let mut sh = Sha256::new();
-        let bytes = [1u8, ..10];
+        let bytes = [1u810];
         b.iter(|| {
             sh.input(&bytes);
         });
@@ -668,7 +668,7 @@ pub fn sha256_10(b: &mut Bencher) {
     #[bench]
     pub fn sha256_1k(b: &mut Bencher) {
         let mut sh = Sha256::new();
-        let bytes = [1u8, ..1024];
+        let bytes = [1u81024];
         b.iter(|| {
             sh.input(&bytes);
         });
@@ -678,7 +678,7 @@ pub fn sha256_1k(b: &mut Bencher) {
     #[bench]
     pub fn sha256_64k(b: &mut Bencher) {
         let mut sh = Sha256::new();
-        let bytes = [1u8, ..65536];
+        let bytes = [1u865536];
         b.iter(|| {
             sh.input(&bytes);
         });
index c6db5340f0f511d9e6865516368908a347b68185..ac2ab56b2c5f8edbb492b5d27787b8eb821bd84a 100644 (file)
 //! the following:
 //!
 //! ```rust
-//! fn foo(a: [D, ..10], i: uint) -> D {
+//! fn foo(a: [D10], i: uint) -> D {
 //!     a[i]
 //! }
 //! ```
 //! would arise is the following:
 //!
 //! ```rust
-//! fn foo(a: [D, ..10], b: [D, ..10], i: uint, t: bool) -> D {
+//! fn foo(a: [D; 10], b: [D; 10], i: uint, t: bool) -> D {
 //!     if t {
 //!         a[i]
 //!     } else {
 //! ```
 //!
 //! There are a number of ways that the trans backend could choose to
-//! compile this (e.g. a `[bool, ..10]` array for each such moved array;
+//! compile this (e.g. a `[bool10]` array for each such moved array;
 //! or an `Option<uint>` for each moved array).  From the viewpoint of the
 //! borrow-checker, the important thing is to record what kind of fragment
 //! is implied by the relevant moves.
index 6129e38e39c12f9e6e0810dfd0101fcd98605996..d748266ed2ea9907a1aa24d0ca7a9a348f23798e 100644 (file)
 //! The first thing that the probe phase does is to create a series of
 //! *steps*. This is done by progressively dereferencing the receiver type
 //! until it cannot be deref'd anymore, as well as applying an optional
-//! "unsize" step. So if the receiver has type `Rc<Box<[T, ..3]>>`, this
+//! "unsize" step. So if the receiver has type `Rc<Box<[T3]>>`, this
 //! might yield:
 //!
-//!     Rc<Box<[T, ..3]>>
-//!     Box<[T, ..3]>
-//!     [T, ..3]
+//!     Rc<Box<[T3]>>
+//!     Box<[T3]>
+//!     [T3]
 //!     [T]
 //!
 //! ### Candidate assembly
 //! method.
 //!
 //! So, let's continue our example. Imagine that we were calling a method
-//! `foo` with the receiver `Rc<Box<[T, ..3]>>` and there is a trait `Foo`
+//! `foo` with the receiver `Rc<Box<[T3]>>` and there is a trait `Foo`
 //! that defines it with `&self` for the type `Rc<U>` as well as a method
 //! on the type `Box` that defines `Foo` but with `&mut self`. Then we
 //! might have two candidates:
 //!
-//!     &Rc<Box<[T, ..3]>> from the impl of `Foo` for `Rc<U>` where `U=Box<T, ..3]>
-//!     &mut Box<[T, ..3]>> from the inherent impl on `Box<U>` where `U=[T, ..3]`
+//!     &Rc<Box<[T; 3]>> from the impl of `Foo` for `Rc<U>` where `U=Box<T; 3]>
+//!     &mut Box<[T; 3]>> from the inherent impl on `Box<U>` where `U=[T; 3]`
 //!
 //! ### Candidate search
 //!
 //! that makes any of the candidates match. We pick the first step where
 //! we find a match.
 //!
-//! In the case of our example, the first step is `Rc<Box<[T, ..3]>>`,
+//! In the case of our example, the first step is `Rc<Box<[T3]>>`,
 //! which does not itself match any candidate. But when we autoref it, we
-//! get the type `&Rc<Box<[T, ..3]>>` which does match. We would then
+//! get the type `&Rc<Box<[T3]>>` which does match. We would then
 //! recursively consider all where-clauses that appear on the impl: if
 //! those match (or we cannot rule out that they do), then this is the
 //! method we would pick. Otherwise, we would continue down the series of
index 2e3552047b48b4cf6b35e96d3ec9505a080c2060..ac2c4337907b105a01cc73973ac3e80c4b4ba0e0 100644 (file)
@@ -4544,7 +4544,7 @@ impl<'tcx> Expectation<'tcx> {
     /// In this case, the expected type for the `&[1, 2, 3]` expression is
     /// `&[int]`. If however we were to say that `[1, 2, 3]` has the
     /// expectation `ExpectHasType([int])`, that would be too strong --
-    /// `[1, 2, 3]` does not have the type `[int]` but rather `[int, ..3]`.
+    /// `[1, 2, 3]` does not have the type `[int]` but rather `[int3]`.
     /// It is only the `&[1, 2, 3]` expression as a whole that can be coerced
     /// to the type `&[int]`. Therefore, we propagate this more limited hint,
     /// which still is useful, because it informs integer literals and the like.
index cd8bc94b111e7fddd97d16befb8f9f0173df148f..a17f3b31be3213139fe6cae69abe182a3612f35a 100644 (file)
@@ -407,9 +407,9 @@ struct ConstraintContext<'a, 'tcx: 'a> {
     // are indexed by the `ParamKind` (type, lifetime, self). Note
     // that there are no marker types for self, so the entries for
     // self are always None.
-    invariant_lang_items: [Option<ast::DefId>, ..2],
-    covariant_lang_items: [Option<ast::DefId>, ..2],
-    contravariant_lang_items: [Option<ast::DefId>, ..2],
+    invariant_lang_items: [Option<ast::DefId>2],
+    covariant_lang_items: [Option<ast::DefId>2],
+    contravariant_lang_items: [Option<ast::DefId>2],
     unsafe_lang_item: Option<ast::DefId>,
 
     // These are pointers to common `ConstantTerm` instances
@@ -432,9 +432,9 @@ struct Constraint<'a> {
 fn add_constraints_from_crate<'a, 'tcx>(terms_cx: TermsContext<'a, 'tcx>,
                                         krate: &ast::Crate)
                                         -> ConstraintContext<'a, 'tcx> {
-    let mut invariant_lang_items = [None, ..2];
-    let mut covariant_lang_items = [None, ..2];
-    let mut contravariant_lang_items = [None, ..2];
+    let mut invariant_lang_items = [None2];
+    let mut covariant_lang_items = [None2];
+    let mut contravariant_lang_items = [None2];
 
     covariant_lang_items[TypeParam as uint] =
         terms_cx.tcx.lang_items.covariant_type();
index bff670f9ea95450957a81001881794da9a12fe64..2c05524ea7f7b51b0133db598fc6bee72c75b8ce 100644 (file)
@@ -80,7 +80,7 @@ struct hoedown_renderer {
     blockhtml: Option<extern "C" fn(*mut hoedown_buffer, *const hoedown_buffer,
                                     *mut libc::c_void)>,
     header: Option<headerfn>,
-    other: [libc::size_t, ..28],
+    other: [libc::size_t28],
 }
 
 #[repr(C)]
index fae73cc834fd243e804df191ed6c07a3d1fdffbe..54b390e0c3f0ab575e8eebc161c7496209b592aa 100644 (file)
@@ -314,7 +314,7 @@ fn test_to_base64_basic() {
 
     #[test]
     fn test_to_base64_crlf_line_break() {
-        assert!(![0u8, ..1000].to_base64(Config {line_length: None, ..STANDARD})
+        assert!(![0u81000].to_base64(Config {line_length: None, ..STANDARD})
                               .contains("\r\n"));
         assert_eq!(b"foobar".to_base64(Config {line_length: Some(4),
                                                ..STANDARD}),
@@ -323,7 +323,7 @@ fn test_to_base64_crlf_line_break() {
 
     #[test]
     fn test_to_base64_lf_line_break() {
-        assert!(![0u8, ..1000].to_base64(Config {line_length: None,
+        assert!(![0u81000].to_base64(Config {line_length: None,
                                                  newline: Newline::LF,
                                                  ..STANDARD})
                               .as_slice()
index 3f0d59c319a69e7e44165573b698555b101129d5..d88bc88dcbae5cce94d63d347b3399f83cc7aeb9 100644 (file)
@@ -399,7 +399,7 @@ fn escape_char(writer: &mut io::Writer, v: char) -> Result<(), io::IoError> {
 
 fn spaces(wr: &mut io::Writer, mut n: uint) -> Result<(), io::IoError> {
     const LEN: uint = 16;
-    static BUF: [u8, ..LEN] = [b' ', ..LEN];
+    static BUF: [u8; LEN] = [b' '; LEN];
 
     while n >= LEN {
         try!(wr.write(&BUF));
index 7bd955a905bbd00c6e9b60d9f2142adee6b6d769..2c2b7313a7bb44a3e3ef053bae2a758329d9ce17 100644 (file)
@@ -234,7 +234,7 @@ pub fn escape_default<F>(c: u8, mut f: F) where
     }
 }
 
-static ASCII_LOWERCASE_MAP: [u8, ..256] = [
+static ASCII_LOWERCASE_MAP: [u8256] = [
     0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
     0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
     0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
@@ -273,7 +273,7 @@ pub fn escape_default<F>(c: u8, mut f: F) where
     0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
 ];
 
-static ASCII_UPPERCASE_MAP: [u8, ..256] = [
+static ASCII_UPPERCASE_MAP: [u8256] = [
     0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
     0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
     0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
index 0fba0f6704be4bac990c9f2dbd06c632f5904b33..c5405601048cea55b9f88eb1eed3804d6474e297 100644 (file)
@@ -39,7 +39,7 @@
 /// let file = File::open(&Path::new("message.txt"));
 /// let mut reader = BufferedReader::new(file);
 ///
-/// let mut buf = [0, ..100];
+/// let mut buf = [0100];
 /// match reader.read(&mut buf) {
 ///     Ok(nread) => println!("Read {} bytes", nread),
 ///     Err(e) => println!("error reading: {}", e)
@@ -326,7 +326,7 @@ fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
 /// stream.write("hello, world".as_bytes());
 /// stream.flush();
 ///
-/// let mut buf = [0, ..100];
+/// let mut buf = [0100];
 /// match stream.read(&mut buf) {
 ///     Ok(nread) => println!("Read {} bytes", nread),
 ///     Err(e) => println!("error reading: {}", e)
index 5f68bbef93220d82cde2cd606d1d22ecf90cd5cd..077f75e2edd6f9e77bf88c55dd93d9bbb8f9c49c 100644 (file)
@@ -29,7 +29,7 @@
 /// # drop(tx);
 /// let mut reader = ChanReader::new(rx);
 ///
-/// let mut buf = [0u8, ..100];
+/// let mut buf = [0u8100];
 /// match reader.read(&mut buf) {
 ///     Ok(nread) => println!("Read {} bytes", nread),
 ///     Err(e) => println!("read error: {}", e),
@@ -171,7 +171,7 @@ fn test_rx_reader() {
         }).detach();
 
         let mut reader = ChanReader::new(rx);
-        let mut buf = [0u8, ..3];
+        let mut buf = [0u83];
 
         assert_eq!(Ok(0), reader.read(&mut []));
 
index e8765e3c2317e5d87d1fa8a04fa3bf0572dcd840..51e09e547e3eef4fb77642fffd8b5344940a1ee9 100644 (file)
@@ -86,9 +86,9 @@ pub fn u64_to_le_bytes<T, F>(n: u64, size: uint, f: F) -> T where
     assert!(size <= 8u);
     match size {
       1u => f(&[n as u8]),
-      2u => f(unsafe { & transmute::<_, [u8, ..2]>((n as u16).to_le()) }),
-      4u => f(unsafe { & transmute::<_, [u8, ..4]>((n as u32).to_le()) }),
-      8u => f(unsafe { & transmute::<_, [u8, ..8]>(n.to_le()) }),
+      2u => f(unsafe { & transmute::<_, [u82]>((n as u16).to_le()) }),
+      4u => f(unsafe { & transmute::<_, [u84]>((n as u32).to_le()) }),
+      8u => f(unsafe { & transmute::<_, [u88]>(n.to_le()) }),
       _ => {
 
         let mut bytes = vec!();
@@ -127,9 +127,9 @@ pub fn u64_to_be_bytes<T, F>(n: u64, size: uint, f: F) -> T where
     assert!(size <= 8u);
     match size {
       1u => f(&[n as u8]),
-      2u => f(unsafe { & transmute::<_, [u8, ..2]>((n as u16).to_be()) }),
-      4u => f(unsafe { & transmute::<_, [u8, ..4]>((n as u32).to_be()) }),
-      8u => f(unsafe { & transmute::<_, [u8, ..8]>(n.to_be()) }),
+      2u => f(unsafe { & transmute::<_, [u82]>((n as u16).to_be()) }),
+      4u => f(unsafe { & transmute::<_, [u84]>((n as u32).to_be()) }),
+      8u => f(unsafe { & transmute::<_, [u88]>(n.to_be()) }),
       _ => {
         let mut bytes = vec!();
         let mut i = size;
@@ -164,7 +164,7 @@ pub fn u64_from_be_bytes(data: &[u8], start: uint, size: uint) -> u64 {
         panic!("index out of bounds");
     }
 
-    let mut buf = [0u8, ..8];
+    let mut buf = [0u88];
     unsafe {
         let ptr = data.as_ptr().offset(start as int);
         let out = buf.as_mut_ptr();
index e4c31ff8dd321a5f1c515721547667bb6dbf978f..f6fb7ec435f14d97eb6880cf9d5978b240ad1c8f 100644 (file)
@@ -1546,7 +1546,7 @@ fn utime_noexist() {
     fn binary_file() {
         use rand::{StdRng, Rng};
 
-        let mut bytes = [0, ..1024];
+        let mut bytes = [01024];
         StdRng::new().ok().unwrap().fill_bytes(&mut bytes);
 
         let tmpdir = tmpdir();
index 79327a29615ae52e47fc09603b6e1926a1bfd5d0..9d73cae094d9dfb52316d73081d4b9a64bbff2ae 100644 (file)
@@ -252,7 +252,7 @@ fn consume(&mut self, amt: uint) {
 /// # #![allow(unused_must_use)]
 /// use std::io::BufWriter;
 ///
-/// let mut buf = [0, ..4];
+/// let mut buf = [04];
 /// {
 ///     let mut w = BufWriter::new(&mut buf);
 ///     w.write(&[0, 1, 2]);
@@ -427,7 +427,7 @@ fn test_mem_writer() {
 
     #[test]
     fn test_buf_writer() {
-        let mut buf = [0 as u8, ..9];
+        let mut buf = [0 as u89];
         {
             let mut writer = BufWriter::new(&mut buf);
             assert_eq!(writer.tell(), Ok(0));
@@ -448,7 +448,7 @@ fn test_buf_writer() {
 
     #[test]
     fn test_buf_writer_seek() {
-        let mut buf = [0 as u8, ..8];
+        let mut buf = [0 as u88];
         {
             let mut writer = BufWriter::new(&mut buf);
             assert_eq!(writer.tell(), Ok(0));
@@ -477,7 +477,7 @@ fn test_buf_writer_seek() {
 
     #[test]
     fn test_buf_writer_error() {
-        let mut buf = [0 as u8, ..2];
+        let mut buf = [0 as u82];
         let mut writer = BufWriter::new(&mut buf);
         writer.write(&[0]).unwrap();
 
@@ -498,7 +498,7 @@ fn test_mem_reader() {
         assert_eq!(reader.tell(), Ok(1));
         let b: &[_] = &[0];
         assert_eq!(buf, b);
-        let mut buf = [0, ..4];
+        let mut buf = [04];
         assert_eq!(reader.read(&mut buf), Ok(4));
         assert_eq!(reader.tell(), Ok(5));
         let b: &[_] = &[1, 2, 3, 4];
@@ -524,7 +524,7 @@ fn test_slice_reader() {
         assert_eq!(reader.len(), 7);
         let b: &[_] = &[0];
         assert_eq!(buf.as_slice(), b);
-        let mut buf = [0, ..4];
+        let mut buf = [04];
         assert_eq!(reader.read(&mut buf), Ok(4));
         assert_eq!(reader.len(), 3);
         let b: &[_] = &[1, 2, 3, 4];
@@ -551,7 +551,7 @@ fn test_buf_reader() {
         assert_eq!(reader.tell(), Ok(1));
         let b: &[_] = &[0];
         assert_eq!(buf, b);
-        let mut buf = [0, ..4];
+        let mut buf = [04];
         assert_eq!(reader.read(&mut buf), Ok(4));
         assert_eq!(reader.tell(), Ok(5));
         let b: &[_] = &[1, 2, 3, 4];
@@ -648,7 +648,7 @@ fn seek_before_0() {
     #[test]
     fn io_read_at_least() {
         let mut r = MemReader::new(vec![1, 2, 3, 4, 5, 6, 7, 8]);
-        let mut buf = [0, ..3];
+        let mut buf = [03];
         assert!(r.read_at_least(buf.len(), &mut buf).is_ok());
         let b: &[_] = &[1, 2, 3];
         assert_eq!(buf, b);
@@ -721,7 +721,7 @@ fn bench_mem_writer_100_1000(b: &mut Bencher) {
     #[bench]
     fn bench_mem_reader(b: &mut Bencher) {
         b.iter(|| {
-            let buf = [5 as u8, ..100].to_vec();
+            let buf = [5 as u8100].to_vec();
             {
                 let mut rdr = MemReader::new(buf);
                 for _i in range(0u, 10) {
@@ -736,7 +736,7 @@ fn bench_mem_reader(b: &mut Bencher) {
     #[bench]
     fn bench_buf_writer(b: &mut Bencher) {
         b.iter(|| {
-            let mut buf = [0 as u8, ..100];
+            let mut buf = [0 as u8100];
             {
                 let mut wr = BufWriter::new(&mut buf);
                 for _i in range(0u, 10) {
@@ -750,7 +750,7 @@ fn bench_buf_writer(b: &mut Bencher) {
     #[bench]
     fn bench_buf_reader(b: &mut Bencher) {
         b.iter(|| {
-            let buf = [5 as u8, ..100];
+            let buf = [5 as u8100];
             {
                 let mut rdr = BufReader::new(&buf);
                 for _i in range(0u, 10) {
index 8d5b125bb081fc268f93ffc03854ddfbb083c078..e8b852ee492b95c02e42ae4bc47daf4bf7d19449 100644 (file)
@@ -1081,7 +1081,7 @@ fn write_line(&mut self, s: &str) -> IoResult<()> {
     /// Write a single char, encoded as UTF-8.
     #[inline]
     fn write_char(&mut self, c: char) -> IoResult<()> {
-        let mut buf = [0u8, ..4];
+        let mut buf = [0u84];
         let n = c.encode_utf8(buf.as_mut_slice()).unwrap_or(0);
         self.write(buf[..n])
     }
@@ -1968,7 +1968,7 @@ fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
     fn test_read_at_least() {
         let mut r = BadReader::new(MemReader::new(b"hello, world!".to_vec()),
                                    vec![GoodBehavior(uint::MAX)]);
-        let buf = &mut [0u8, ..5];
+        let buf = &mut [0u85];
         assert!(r.read_at_least(1, buf).unwrap() >= 1);
         assert!(r.read_exact(5).unwrap().len() == 5); // read_exact uses read_at_least
         assert!(r.read_at_least(0, buf).is_ok());
index 4830b15a8432e0c046241339ee07a3e5fd00e46d..49ab9ddb92487a6c24038e54a910f2bbd830ac98 100644 (file)
@@ -223,7 +223,7 @@ fn read_number(&mut self, radix: u8, max_digits: u32, upto: u32) -> Option<u32>
     }
 
     fn read_ipv4_addr_impl(&mut self) -> Option<IpAddr> {
-        let mut bs = [0u8, ..4];
+        let mut bs = [0u84];
         let mut i = 0;
         while i < 4 {
             if i != 0 && self.read_given_char('.').is_none() {
@@ -248,13 +248,13 @@ fn read_ipv4_addr(&mut self) -> Option<IpAddr> {
     fn read_ipv6_addr_impl(&mut self) -> Option<IpAddr> {
         fn ipv6_addr_from_head_tail(head: &[u16], tail: &[u16]) -> IpAddr {
             assert!(head.len() + tail.len() <= 8);
-            let mut gs = [0u16, ..8];
+            let mut gs = [0u168];
             gs.clone_from_slice(head);
             gs.slice_mut(8 - tail.len(), 8).clone_from_slice(tail);
             Ipv6Addr(gs[0], gs[1], gs[2], gs[3], gs[4], gs[5], gs[6], gs[7])
         }
 
-        fn read_groups(p: &mut Parser, groups: &mut [u16, ..8], limit: uint) -> (uint, bool) {
+        fn read_groups(p: &mut Parser, groups: &mut [u168], limit: uint) -> (uint, bool) {
             let mut i = 0;
             while i < limit {
                 if i < limit - 1 {
@@ -291,7 +291,7 @@ fn read_groups(p: &mut Parser, groups: &mut [u16, ..8], limit: uint) -> (uint, b
             (i, false)
         }
 
-        let mut head = [0u16, ..8];
+        let mut head = [0u168];
         let (head_size, head_ipv4) = read_groups(self, &mut head, 8);
 
         if head_size == 8 {
@@ -310,7 +310,7 @@ fn read_groups(p: &mut Parser, groups: &mut [u16, ..8], limit: uint) -> (uint, b
             return None;
         }
 
-        let mut tail = [0u16, ..8];
+        let mut tail = [0u168];
         let (tail_size, _) = read_groups(self, &mut tail, 8 - head_size);
         Some(ipv6_addr_from_head_tail(head[..head_size], tail[..tail_size]))
     }
index 24cf06973cc6939f982f6ce6725d42003dfe6557..4706ab35d1d3f14fb44aa0109f6102ead1fb7d91 100644 (file)
@@ -979,7 +979,7 @@ fn partial_read() {
 
         rx.recv();
         let mut c = TcpStream::connect(addr).unwrap();
-        let mut b = [0, ..10];
+        let mut b = [010];
         assert_eq!(c.read(&mut b), Ok(1));
         c.write(&[1]).unwrap();
         rx.recv();
index 73bcdad34c3a0433f9efd39ac2fe9975923f93e3..62868afa00a31338d4e97ef16517d4270de70d71 100644 (file)
@@ -45,7 +45,7 @@
 ///         Err(e) => panic!("couldn't bind socket: {}", e),
 ///     };
 ///
-///     let mut buf = [0, ..10];
+///     let mut buf = [010];
 ///     match socket.recv_from(&mut buf) {
 ///         Ok((amt, src)) => {
 ///             // Send a reply to the socket we received data from
index 73a893c4f2dcddd64196f5719af557e3ec42e034..93465d5510b87893a2373627362686da901218fb 100644 (file)
@@ -129,7 +129,7 @@ fn partial_read() {
             rx.recv(); // don't close the pipe until the other read has finished
         });
 
-        let mut buf = [0, ..10];
+        let mut buf = [010];
         input.read(&mut buf).unwrap();
         tx.send(());
     }
index af56735021e8646bda59f2ea981bc925817fe2fc..40941fda79c93821cd3a604fc7a1516f48c68d90 100644 (file)
@@ -130,7 +130,7 @@ pub unsafe fn raise_fd_limit() {
         use os::last_os_error;
 
         // Fetch the kern.maxfilesperproc value
-        let mut mib: [libc::c_int, ..2] = [CTL_KERN, KERN_MAXFILESPERPROC];
+        let mut mib: [libc::c_int2] = [CTL_KERN, KERN_MAXFILESPERPROC];
         let mut maxfiles: libc::c_int = 0;
         let mut size: libc::size_t = size_of_val(&maxfiles) as libc::size_t;
         if sysctl(&mut mib[0], 2, &mut maxfiles as *mut libc::c_int as *mut libc::c_void, &mut size,
index 2a98067c970804ad265491a94bb29cfd55967999..f88e8d7e7e3b4f000e11027de7b8d0a9d241c318 100644 (file)
@@ -103,7 +103,7 @@ fn read(&mut self, buf: &mut [u8]) -> io::IoResult<uint> {
 
 impl Buffer for ZeroReader {
     fn fill_buf<'a>(&'a mut self) -> io::IoResult<&'a [u8]> {
-        static DATA: [u8, ..64] = [0, ..64];
+        static DATA: [u8; 64] = [0; 64];
         Ok(DATA.as_slice())
     }
 
index 25af3bf2d53835fca3b9c2f6378c49c5b201977d..febdf5f6118a58cbd485f78991f04b7d928f3c2b 100644 (file)
@@ -104,7 +104,7 @@ fn int_to_str_bytes_common<T, F>(num: T, radix: uint, sign: SignFormat, mut f: F
     // This is just for integral types, the largest of which is a u64. The
     // smallest base that we can have is 2, so the most number of digits we're
     // ever going to have is 64
-    let mut buf = [0u8, ..64];
+    let mut buf = [0u864];
     let mut cur = 0;
 
     // Loop at least once to make sure at least a `0` gets emitted.
index c42b7eebfdd1c59f9f0d64022c00dd0984f4e864..e74f45f8f0a159d26f744a9ba40962673797e613 100644 (file)
@@ -38,7 +38,7 @@ pub fn to_str_bytes<U, F>(n: $T, radix: uint, f: F) -> U where
     use io::{Writer, Seek};
     // The radix can be as low as 2, so we need at least 64 characters for a
     // base 2 number, and then we need another for a possible '-' character.
-    let mut buf = [0u8, ..65];
+    let mut buf = [0u865];
     let amt = {
         let mut wr = ::io::BufWriter::new(&mut buf);
         (write!(&mut wr, "{}", ::fmt::radix(n, radix as u8))).unwrap();
index 91b6a1f0ce0ce8a8e176634c642693e8cafbf1ab..3b3e9ae627595bd725b62215ec7b8d1ef58132fa 100644 (file)
@@ -70,15 +70,15 @@ fn getrandom_fill_bytes(v: &mut [u8]) {
     }
 
     fn getrandom_next_u32() -> u32 {
-        let mut buf: [u8, ..4] = [0u8, ..4];
+        let mut buf: [u8; 4] = [0u8; 4];
         getrandom_fill_bytes(&mut buf);
-        unsafe { mem::transmute::<[u8, ..4], u32>(buf) }
+        unsafe { mem::transmute::<[u84], u32>(buf) }
     }
 
     fn getrandom_next_u64() -> u64 {
-        let mut buf: [u8, ..8] = [0u8, ..8];
+        let mut buf: [u8; 8] = [0u8; 8];
         getrandom_fill_bytes(&mut buf);
-        unsafe { mem::transmute::<[u8, ..8], u64>(buf) }
+        unsafe { mem::transmute::<[u88], u64>(buf) }
     }
 
     #[cfg(all(target_os = "linux",
@@ -90,7 +90,7 @@ fn is_getrandom_available() -> bool {
         static GETRANDOM_AVAILABLE: AtomicBool = INIT_ATOMIC_BOOL;
 
         if !GETRANDOM_CHECKED.load(Relaxed) {
-            let mut buf: [u8, ..0] = [];
+            let mut buf: [u80] = [];
             let result = getrandom(&mut buf);
             let available = if result == -1 {
                 let err = errno() as libc::c_int;
index 5448af3f753b33eeb7e415a99c181241e45e4be8..fee86e33455d40c086e96c835bc0c675eca5537f 100644 (file)
@@ -134,7 +134,7 @@ fn write(&mut self, bytes: &[u8]) -> fmt::Result {
     }
 
     // Convert the arguments into a stack-allocated string
-    let mut msg = [0u8, ..512];
+    let mut msg = [0u8512];
     let mut w = BufWriter { buf: &mut msg, pos: 0 };
     let _ = write!(&mut w, "{}", args);
     let msg = str::from_utf8(w.buf[mut ..w.pos]).unwrap_or("aborted");
index ddae9a132c31483a88b79286e6d3c1c747a872df..9e26475f814b79d483b04438bfd55eb01524ece5 100644 (file)
@@ -123,7 +123,7 @@ fn backtrace(buf: *mut *mut libc::c_void,
     try!(writeln!(w, "stack backtrace:"));
     // 100 lines should be enough
     const SIZE: uint = 100;
-    let mut buf: [*mut libc::c_void, ..SIZE] = unsafe {mem::zeroed()};
+    let mut buf: [*mut libc::c_voidSIZE] = unsafe {mem::zeroed()};
     let cnt = unsafe { backtrace(buf.as_mut_ptr(), SIZE as libc::c_int) as uint};
 
     // skipping the first one as it is write itself
@@ -320,7 +320,7 @@ fn backtrace_syminfo(state: *mut backtrace_state,
     //        tested if this is required or not.
     unsafe fn init_state() -> *mut backtrace_state {
         static mut STATE: *mut backtrace_state = 0 as *mut backtrace_state;
-        static mut LAST_FILENAME: [libc::c_char, ..256] = [0, ..256];
+        static mut LAST_FILENAME: [libc::c_char; 256] = [0; 256];
         if !STATE.is_null() { return STATE }
         let selfname = if cfg!(target_os = "freebsd") ||
                           cfg!(target_os = "dragonfly") {
index 208dc60e405dcb87d109b7c82f6273dd55c83069..417f1bf76028160c35e27f95bb9922f2c452a527 100644 (file)
@@ -168,13 +168,13 @@ unsafe impl ::kinds::Sync for sigaction { }
     #[repr(C)]
     #[cfg(target_word_size = "32")]
     pub struct sigset_t {
-        __val: [libc::c_ulong, ..32],
+        __val: [libc::c_ulong32],
     }
 
     #[repr(C)]
     #[cfg(target_word_size = "64")]
     pub struct sigset_t {
-        __val: [libc::c_ulong, ..16],
+        __val: [libc::c_ulong16],
     }
 }
 
@@ -211,7 +211,7 @@ pub struct sigaction {
         pub sa_handler: extern fn(libc::c_int),
         pub sa_mask: sigset_t,
         sa_restorer: *mut libc::c_void,
-        sa_resv: [libc::c_int, ..1],
+        sa_resv: [libc::c_int1],
     }
 
     unsafe impl ::kinds::Send for sigaction { }
@@ -219,7 +219,7 @@ unsafe impl ::kinds::Sync for sigaction { }
 
     #[repr(C)]
     pub struct sigset_t {
-        __val: [libc::c_ulong, ..32],
+        __val: [libc::c_ulong32],
     }
 }
 
@@ -244,7 +244,7 @@ mod signal {
     #[cfg(any(target_os = "freebsd", target_os = "dragonfly"))]
     #[repr(C)]
     pub struct sigset_t {
-        bits: [u32, ..4],
+        bits: [u324],
     }
 
     // This structure has more fields, but we're not all that interested in
index 98d860f964649bed70b2ec478abd401e0b3c0f0c..8de4ffa7022a92ece4d9e289b25a90f3668ccd7b 100644 (file)
@@ -372,7 +372,7 @@ fn test_file_desc() {
         let mut writer = FileDesc::new(writer, true);
 
         writer.write(b"test").ok().unwrap();
-        let mut buf = [0u8, ..4];
+        let mut buf = [0u84];
         match reader.read(&mut buf) {
             Ok(4) => {
                 assert_eq!(buf[0], 't' as u8);
index cafe52f8403b6d312c1d6c66f079d49b7c76a92b..624d61cd41ff5f56cb92fe73bf89824bdee1b091 100644 (file)
@@ -113,7 +113,7 @@ fn __xpg_strerror_r(errnum: c_int,
 }
 
 pub unsafe fn pipe() -> IoResult<(FileDesc, FileDesc)> {
-    let mut fds = [0, ..2];
+    let mut fds = [02];
     if libc::pipe(fds.as_mut_ptr()) == 0 {
         Ok((FileDesc::new(fds[0], true), FileDesc::new(fds[1], true)))
     } else {
index 615e3a21bd0ac79c774f5392fd265f7728057a01..c1c28bd5fc4dfaf3154ac600c494e7e4bac5c037 100644 (file)
@@ -120,7 +120,7 @@ fn combine(arr: &[u8]) -> i32 {
 
                     let p = Process{ pid: pid };
                     drop(output);
-                    let mut bytes = [0, ..8];
+                    let mut bytes = [08];
                     return match input.read(&mut bytes) {
                         Ok(8) => {
                             assert!(combine(CLOEXEC_MSG_FOOTER) == combine(bytes.slice(4, 8)),
@@ -348,7 +348,7 @@ pub fn wait(&self, deadline: u64) -> IoResult<ProcessExit> {
         // handler we're going to start receiving signals.
         fn register_sigchld() -> (libc::c_int, c::sigaction) {
             unsafe {
-                let mut pipes = [0, ..2];
+                let mut pipes = [02];
                 assert_eq!(libc::pipe(pipes.as_mut_ptr()), 0);
                 set_nonblocking(pipes[0], true).ok().unwrap();
                 set_nonblocking(pipes[1], true).ok().unwrap();
@@ -482,7 +482,7 @@ fn waitpid_helper(input: libc::c_int,
         fn drain(fd: libc::c_int) -> bool {
             let mut ret = false;
             loop {
-                let mut buf = [0u8, ..1];
+                let mut buf = [0u81];
                 match unsafe {
                     libc::read(fd, buf.as_mut_ptr() as *mut libc::c_void,
                                buf.len() as libc::size_t)
index bcbbb8766b7f47038534f8b574e19be6c9773989..95ab9b459d671b152f8db2eed0bd75db538929c4 100644 (file)
@@ -184,12 +184,12 @@ pub struct sigaction {
         #[cfg(target_word_size = "32")]
         #[repr(C)]
         pub struct sigset_t {
-            __val: [libc::c_ulong, ..32],
+            __val: [libc::c_ulong32],
         }
         #[cfg(target_word_size = "64")]
         #[repr(C)]
         pub struct sigset_t {
-            __val: [libc::c_ulong, ..16],
+            __val: [libc::c_ulong16],
         }
 
         #[repr(C)]
index 007826b4b9d58b3f6f40515e1c3b9a26f6387440..8b62def62b61b5a26288cbba73ec9b062e7f30a4 100644 (file)
@@ -187,7 +187,7 @@ pub struct pthread_rwlock_t {
         writerThreadId: libc::c_int,
         pendingReaders: libc::c_int,
         pendingWriters: libc::c_int,
-        reserved: [*mut libc::c_void, ..4],
+        reserved: [*mut libc::c_void4],
     }
 
     pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
@@ -203,6 +203,6 @@ pub struct pthread_rwlock_t {
         writerThreadId: 0,
         pendingReaders: 0,
         pendingWriters: 0,
-        reserved: [0 as *mut _, ..4],
+        reserved: [0 as *mut _4],
     };
 }
index 42c8f7705e1fcdf2fbcdce5c43ad091486d2ece2..4f45831cb3af4756a53c63b74b2a3dd3e90d22a9 100644 (file)
@@ -68,7 +68,7 @@
 struct SYMBOL_INFO {
     SizeOfStruct: libc::c_ulong,
     TypeIndex: libc::c_ulong,
-    Reserved: [u64, ..2],
+    Reserved: [u642],
     Index: libc::c_ulong,
     Size: libc::c_ulong,
     ModBase: u64,
@@ -108,10 +108,10 @@ struct STACKFRAME64 {
     AddrStack: ADDRESS64,
     AddrBStore: ADDRESS64,
     FuncTableEntry: *mut libc::c_void,
-    Params: [u64, ..4],
+    Params: [u644],
     Far: libc::BOOL,
     Virtual: libc::BOOL,
-    Reserved: [u64, ..3],
+    Reserved: [u643],
     KdHelp: KDHELP64,
 }
 
@@ -127,7 +127,7 @@ struct KDHELP64 {
     KiUserExceptionDispatcher: u64,
     StackBase: u64,
     StackLimit: u64,
-    Reserved: [u64, ..5],
+    Reserved: [u645],
 }
 
 #[cfg(target_arch = "x86")]
@@ -174,7 +174,7 @@ pub struct FLOATING_SAVE_AREA {
         ErrorSelector: libc::DWORD,
         DataOffset: libc::DWORD,
         DataSelector: libc::DWORD,
-        RegisterArea: [u8, ..80],
+        RegisterArea: [u880],
         Cr0NpxState: libc::DWORD,
     }
 
@@ -198,7 +198,7 @@ mod arch {
 
     #[repr(C)]
     pub struct CONTEXT {
-        _align_hack: [simd::u64x2, ..0], // FIXME align on 16-byte
+        _align_hack: [simd::u64x20], // FIXME align on 16-byte
         P1Home: DWORDLONG,
         P2Home: DWORDLONG,
         P3Home: DWORDLONG,
@@ -257,15 +257,15 @@ pub struct CONTEXT {
 
     #[repr(C)]
     pub struct M128A {
-        _align_hack: [simd::u64x2, ..0], // FIXME align on 16-byte
+        _align_hack: [simd::u64x20], // FIXME align on 16-byte
         Low:  c_ulonglong,
         High: c_longlong
     }
 
     #[repr(C)]
     pub struct FLOATING_SAVE_AREA {
-        _align_hack: [simd::u64x2, ..0], // FIXME align on 16-byte
-        _Dummy: [u8, ..512] // FIXME: Fill this out
+        _align_hack: [simd::u64x20], // FIXME align on 16-byte
+        _Dummy: [u8512] // FIXME: Fill this out
     }
 
     pub fn init_frame(frame: &mut super::STACKFRAME64,
index 0f26e36a80fd6f85b95d5da7c0ffe4d47a091d93..127d4f996220057f7f3b666c9ce5efb6e364cd75 100644 (file)
@@ -112,7 +112,7 @@ pub unsafe fn pipe() -> IoResult<(FileDesc, FileDesc)> {
     // fully understand. Here we explicitly make the pipe non-inheritable,
     // which means to pass it to a subprocess they need to be duplicated
     // first, as in std::run.
-    let mut fds = [0, ..2];
+    let mut fds = [02];
     match libc::pipe(fds.as_mut_ptr(), 1024 as ::libc::c_uint,
                      (libc::O_BINARY | libc::O_NOINHERIT) as c_int) {
         0 => {
index cce21bbef26c6aed729b7f22d7899c17483816df..457085f5cc84878c61d935fe0ba8af1d5a83b6b4 100644 (file)
@@ -292,7 +292,7 @@ pub struct Parser<'a> {
     pub cfg: CrateConfig,
     /// the previous token or None (only stashed sometimes).
     pub last_token: Option<Box<token::Token>>,
-    pub buffer: [TokenAndSpan, ..4],
+    pub buffer: [TokenAndSpan4],
     pub buffer_start: int,
     pub buffer_end: int,
     pub tokens_consumed: uint,
@@ -2146,7 +2146,7 @@ pub fn mk_slice(&mut self,
             (&None, &Some(ref e)) => (e.span.lo, e.span.hi),
             (&None, &None) => (DUMMY_SP.lo, DUMMY_SP.hi),
         };
-        ExprIndex(expr, self.mk_expr(lo, hi, self.mk_range(start, end)))
+        ExprIndex(expr, self.mk_expr(lo, hi, ExprRange(start, end)))
     }
 
     pub fn mk_range(&mut self,
index 680ed55cd98438db54a196aec96a8f14311b8a4a..35d1e166e9ca4cc1744d5ad0f375105be29810e0 100644 (file)
@@ -53,9 +53,9 @@ pub enum Param {
 /// Container for static and dynamic variable arrays
 pub struct Variables {
     /// Static variables A-Z
-    sta: [Param, ..26],
+    sta: [Param26],
     /// Dynamic variables a-z
-    dyn: [Param, ..26]
+    dyn: [Param26]
 }
 
 impl Variables {
index 9a67ee8836baecfb30d2cca5f6ade9442ec261ae..3130ad0af3fa7a26e8c4cbff0b598defb1cb07b9 100644 (file)
@@ -32,11 +32,11 @@ pub struct WinConsole<T> {
 #[allow(non_snake_case)]
 #[repr(C)]
 struct CONSOLE_SCREEN_BUFFER_INFO {
-    dwSize: [libc::c_short, ..2],
-    dwCursorPosition: [libc::c_short, ..2],
+    dwSize: [libc::c_short2],
+    dwCursorPosition: [libc::c_short2],
     wAttributes: libc::WORD,
-    srWindow: [libc::c_short, ..4],
-    dwMaximumWindowSize: [libc::c_short, ..2],
+    srWindow: [libc::c_short4],
+    dwMaximumWindowSize: [libc::c_short2],
 }
 
 #[allow(non_snake_case)]
index c097e9337905093b510f1d1c6f0c30519c641fe9..19821ecb7ca7a03b75effb31f911d7ed7b699eb3 100644 (file)
@@ -1387,7 +1387,7 @@ pub fn auto_bench<F>(&mut self, mut f: F) -> stats::Summary<f64> where F: FnMut(
         if n == 0 { n = 1; }
 
         let mut total_run = Duration::nanoseconds(0);
-        let samples : &mut [f64] = &mut [0.0_f64, ..50];
+        let samples : &mut [f64] = &mut [0.0_f6450];
         loop {
             let mut summ = None;
             let mut summ5 = None;
index 398728bb51652f68af32d3ce2db9aa41dd5ffa30..9b473ea5f54a709fe84fe88f28c24ecbd13be288 100644 (file)
@@ -353,7 +353,7 @@ fn next_back(&mut self) -> Option<&'a str> {
 }
 
 // https://tools.ietf.org/html/rfc3629
-static UTF8_CHAR_WIDTH: [u8, ..256] = [
+static UTF8_CHAR_WIDTH: [u8256] = [
 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // 0x1F
 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
@@ -519,7 +519,7 @@ fn next(&mut self) -> Option<u16> {
             return Some(tmp);
         }
 
-        let mut buf = [0u16, ..2];
+        let mut buf = [0u162];
         self.chars.next().map(|ch| {
             let n = ch.encode_utf16(buf.as_mut_slice()).unwrap_or(0);
             if n == 2 { self.extra = buf[1]; }
index ad0954e6eabc3f777ddca657b98f3031a76d63b4..84c592defaa26cbc5cad3216e91b73a6e483adca 100644 (file)
 
 // #4264 fixed-length vector types
 
-pub fn foo(_: [int, ..3]) {}
+pub fn foo(_: [int3]) {}
 
 pub fn bar() {
     const FOO: uint = 5u - 4u;
-    let _: [(), ..FOO] = [()];
+    let _: [()FOO] = [()];
 
     let _ : [(), ..1u] = [()];
 
index d8d74c8bb45ae2eaa7cbba22f4264e378494a8be..34ff0b3821cc6dfc85ce519e46c962ae5e03fb65 100644 (file)
@@ -54,7 +54,7 @@ struct Foo {
     // and tuples
     assert_eq!(size_of::<(u8, Box<int>)>(), size_of::<Option<(u8, Box<int>)>>());
     // and fixed-size arrays
-    assert_eq!(size_of::<[Box<int>, ..1]>(), size_of::<Option<[Box<int>, ..1]>>());
+    assert_eq!(size_of::<[Box<int>; 1]>(), size_of::<Option<[Box<int>; 1]>>());
 
     // Should apply to NonZero
     assert_eq!(size_of::<NonZero<uint>>(), size_of::<Option<NonZero<uint>>>());
index 7c007cf9d33748130652eb5952344cc17e497941..961a4472bd4e7cae4ed0e1d77889f196b7ebe019 100644 (file)
@@ -26,7 +26,7 @@ enum e2 {
 }
 
 enum e3 {
-    a([u16, ..0], u8), b
+    a([u160], u8), b
 }
 
 pub fn main() {