about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
authorNick Cameron <ncameron@mozilla.com>2014-12-30 21:19:41 +1300
committerNick Cameron <ncameron@mozilla.com>2015-01-02 10:28:19 +1300
commit7e2b9ea235c2bf4cc9a7575c8e0f70950208b8f2 (patch)
tree6a5a44169970430b93c4d57e782b4f8bde45a5cf /src/libstd/sys
parent57a74eda8811bb04da2e081e3029aeec2f0bdcf4 (diff)
downloadrust-7e2b9ea235c2bf4cc9a7575c8e0f70950208b8f2.tar.gz
rust-7e2b9ea235c2bf4cc9a7575c8e0f70950208b8f2.zip
Fallout - change array syntax to use `;`
Diffstat (limited to 'src/libstd/sys')
-rw-r--r--src/libstd/sys/unix/backtrace.rs4
-rw-r--r--src/libstd/sys/unix/c.rs10
-rw-r--r--src/libstd/sys/unix/fs.rs2
-rw-r--r--src/libstd/sys/unix/os.rs2
-rw-r--r--src/libstd/sys/unix/process.rs6
-rw-r--r--src/libstd/sys/unix/stack_overflow.rs4
-rw-r--r--src/libstd/sys/unix/sync.rs4
-rw-r--r--src/libstd/sys/windows/backtrace.rs18
-rw-r--r--src/libstd/sys/windows/os.rs2
9 files changed, 26 insertions, 26 deletions
diff --git a/src/libstd/sys/unix/backtrace.rs b/src/libstd/sys/unix/backtrace.rs
index ddae9a132c3..9e26475f814 100644
--- a/src/libstd/sys/unix/backtrace.rs
+++ b/src/libstd/sys/unix/backtrace.rs
@@ -123,7 +123,7 @@ pub fn write(w: &mut Writer) -> IoResult<()> {
     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_void; SIZE] = 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 print(w: &mut Writer, idx: int, addr: *mut libc::c_void) -> IoResult<()> {
     //        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") {
diff --git a/src/libstd/sys/unix/c.rs b/src/libstd/sys/unix/c.rs
index 208dc60e405..417f1bf7602 100644
--- a/src/libstd/sys/unix/c.rs
+++ b/src/libstd/sys/unix/c.rs
@@ -168,13 +168,13 @@ mod signal {
     #[repr(C)]
     #[cfg(target_word_size = "32")]
     pub struct sigset_t {
-        __val: [libc::c_ulong, ..32],
+        __val: [libc::c_ulong; 32],
     }
 
     #[repr(C)]
     #[cfg(target_word_size = "64")]
     pub struct sigset_t {
-        __val: [libc::c_ulong, ..16],
+        __val: [libc::c_ulong; 16],
     }
 }
 
@@ -211,7 +211,7 @@ mod signal {
         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_int; 1],
     }
 
     unsafe impl ::kinds::Send for sigaction { }
@@ -219,7 +219,7 @@ mod signal {
 
     #[repr(C)]
     pub struct sigset_t {
-        __val: [libc::c_ulong, ..32],
+        __val: [libc::c_ulong; 32],
     }
 }
 
@@ -244,7 +244,7 @@ mod signal {
     #[cfg(any(target_os = "freebsd", target_os = "dragonfly"))]
     #[repr(C)]
     pub struct sigset_t {
-        bits: [u32, ..4],
+        bits: [u32; 4],
     }
 
     // This structure has more fields, but we're not all that interested in
diff --git a/src/libstd/sys/unix/fs.rs b/src/libstd/sys/unix/fs.rs
index 98d860f9646..8de4ffa7022 100644
--- a/src/libstd/sys/unix/fs.rs
+++ b/src/libstd/sys/unix/fs.rs
@@ -372,7 +372,7 @@ mod tests {
         let mut writer = FileDesc::new(writer, true);
 
         writer.write(b"test").ok().unwrap();
-        let mut buf = [0u8, ..4];
+        let mut buf = [0u8; 4];
         match reader.read(&mut buf) {
             Ok(4) => {
                 assert_eq!(buf[0], 't' as u8);
diff --git a/src/libstd/sys/unix/os.rs b/src/libstd/sys/unix/os.rs
index cafe52f8403..624d61cd41f 100644
--- a/src/libstd/sys/unix/os.rs
+++ b/src/libstd/sys/unix/os.rs
@@ -113,7 +113,7 @@ pub fn error_string(errno: i32) -> String {
 }
 
 pub unsafe fn pipe() -> IoResult<(FileDesc, FileDesc)> {
-    let mut fds = [0, ..2];
+    let mut fds = [0; 2];
     if libc::pipe(fds.as_mut_ptr()) == 0 {
         Ok((FileDesc::new(fds[0], true), FileDesc::new(fds[1], true)))
     } else {
diff --git a/src/libstd/sys/unix/process.rs b/src/libstd/sys/unix/process.rs
index 615e3a21bd0..c1c28bd5fc4 100644
--- a/src/libstd/sys/unix/process.rs
+++ b/src/libstd/sys/unix/process.rs
@@ -120,7 +120,7 @@ impl Process {
 
                     let p = Process{ pid: pid };
                     drop(output);
-                    let mut bytes = [0, ..8];
+                    let mut bytes = [0; 8];
                     return match input.read(&mut bytes) {
                         Ok(8) => {
                             assert!(combine(CLOEXEC_MSG_FOOTER) == combine(bytes.slice(4, 8)),
@@ -348,7 +348,7 @@ impl Process {
         // 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 = [0; 2];
                 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 @@ impl Process {
         fn drain(fd: libc::c_int) -> bool {
             let mut ret = false;
             loop {
-                let mut buf = [0u8, ..1];
+                let mut buf = [0u8; 1];
                 match unsafe {
                     libc::read(fd, buf.as_mut_ptr() as *mut libc::c_void,
                                buf.len() as libc::size_t)
diff --git a/src/libstd/sys/unix/stack_overflow.rs b/src/libstd/sys/unix/stack_overflow.rs
index bcbbb8766b7..95ab9b459d6 100644
--- a/src/libstd/sys/unix/stack_overflow.rs
+++ b/src/libstd/sys/unix/stack_overflow.rs
@@ -184,12 +184,12 @@ mod imp {
         #[cfg(target_word_size = "32")]
         #[repr(C)]
         pub struct sigset_t {
-            __val: [libc::c_ulong, ..32],
+            __val: [libc::c_ulong; 32],
         }
         #[cfg(target_word_size = "64")]
         #[repr(C)]
         pub struct sigset_t {
-            __val: [libc::c_ulong, ..16],
+            __val: [libc::c_ulong; 16],
         }
 
         #[repr(C)]
diff --git a/src/libstd/sys/unix/sync.rs b/src/libstd/sys/unix/sync.rs
index 007826b4b9d..8b62def62b6 100644
--- a/src/libstd/sys/unix/sync.rs
+++ b/src/libstd/sys/unix/sync.rs
@@ -187,7 +187,7 @@ mod os {
         writerThreadId: libc::c_int,
         pendingReaders: libc::c_int,
         pendingWriters: libc::c_int,
-        reserved: [*mut libc::c_void, ..4],
+        reserved: [*mut libc::c_void; 4],
     }
 
     pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
@@ -203,6 +203,6 @@ mod os {
         writerThreadId: 0,
         pendingReaders: 0,
         pendingWriters: 0,
-        reserved: [0 as *mut _, ..4],
+        reserved: [0 as *mut _; 4],
     };
 }
diff --git a/src/libstd/sys/windows/backtrace.rs b/src/libstd/sys/windows/backtrace.rs
index 42c8f7705e1..4f45831cb3a 100644
--- a/src/libstd/sys/windows/backtrace.rs
+++ b/src/libstd/sys/windows/backtrace.rs
@@ -68,7 +68,7 @@ const IMAGE_FILE_MACHINE_AMD64: libc::DWORD = 0x8664;
 struct SYMBOL_INFO {
     SizeOfStruct: libc::c_ulong,
     TypeIndex: libc::c_ulong,
-    Reserved: [u64, ..2],
+    Reserved: [u64; 2],
     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: [u64; 4],
     Far: libc::BOOL,
     Virtual: libc::BOOL,
-    Reserved: [u64, ..3],
+    Reserved: [u64; 3],
     KdHelp: KDHELP64,
 }
 
@@ -127,7 +127,7 @@ struct KDHELP64 {
     KiUserExceptionDispatcher: u64,
     StackBase: u64,
     StackLimit: u64,
-    Reserved: [u64, ..5],
+    Reserved: [u64; 5],
 }
 
 #[cfg(target_arch = "x86")]
@@ -174,7 +174,7 @@ mod arch {
         ErrorSelector: libc::DWORD,
         DataOffset: libc::DWORD,
         DataSelector: libc::DWORD,
-        RegisterArea: [u8, ..80],
+        RegisterArea: [u8; 80],
         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::u64x2; 0], // FIXME align on 16-byte
         P1Home: DWORDLONG,
         P2Home: DWORDLONG,
         P3Home: DWORDLONG,
@@ -257,15 +257,15 @@ mod arch {
 
     #[repr(C)]
     pub struct M128A {
-        _align_hack: [simd::u64x2, ..0], // FIXME align on 16-byte
+        _align_hack: [simd::u64x2; 0], // 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::u64x2; 0], // FIXME align on 16-byte
+        _Dummy: [u8; 512] // FIXME: Fill this out
     }
 
     pub fn init_frame(frame: &mut super::STACKFRAME64,
diff --git a/src/libstd/sys/windows/os.rs b/src/libstd/sys/windows/os.rs
index 0f26e36a80f..127d4f99622 100644
--- a/src/libstd/sys/windows/os.rs
+++ b/src/libstd/sys/windows/os.rs
@@ -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 = [0; 2];
     match libc::pipe(fds.as_mut_ptr(), 1024 as ::libc::c_uint,
                      (libc::O_BINARY | libc::O_NOINHERIT) as c_int) {
         0 => {