diff options
| author | bors <bors@rust-lang.org> | 2015-01-02 02:31:12 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-01-02 02:31:12 +0000 |
| commit | cd614164e692cca3a1460737f581fcb6d4630baf (patch) | |
| tree | 9543983dc912f84eb6c12a1db4531c17c280388e /src/libstd/sys/windows | |
| parent | 39d74026663597a8d4ad0ab04e6d117bf9fd6ad4 (diff) | |
| parent | 2c92ddeda7e2a8e9b6d6b629818eacdb96787575 (diff) | |
| download | rust-cd614164e692cca3a1460737f581fcb6d4630baf.tar.gz rust-cd614164e692cca3a1460737f581fcb6d4630baf.zip | |
auto merge of #20387 : nick29581/rust/arrays-2, r=alexcrichton
Closes #19999
Diffstat (limited to 'src/libstd/sys/windows')
| -rw-r--r-- | src/libstd/sys/windows/backtrace.rs | 24 | ||||
| -rw-r--r-- | src/libstd/sys/windows/c.rs | 12 | ||||
| -rw-r--r-- | src/libstd/sys/windows/os.rs | 6 | ||||
| -rw-r--r-- | src/libstd/sys/windows/stack_overflow.rs | 2 |
4 files changed, 22 insertions, 22 deletions
diff --git a/src/libstd/sys/windows/backtrace.rs b/src/libstd/sys/windows/backtrace.rs index 42c8f7705e1..319a458087b 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, @@ -83,7 +83,7 @@ struct SYMBOL_INFO { // note that windows has this as 1, but it basically just means that // the name is inline at the end of the struct. For us, we just bump // the struct size up to MAX_SYM_NAME. - Name: [libc::c_char, ..MAX_SYM_NAME], + Name: [libc::c_char; MAX_SYM_NAME], } @@ -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")] @@ -162,7 +162,7 @@ mod arch { EFlags: libc::DWORD, Esp: libc::DWORD, SegSs: libc::DWORD, - ExtendedRegisters: [u8, ..MAXIMUM_SUPPORTED_EXTENSION], + ExtendedRegisters: [u8; MAXIMUM_SUPPORTED_EXTENSION], } #[repr(C)] @@ -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, @@ -245,7 +245,7 @@ mod arch { FltSave: FLOATING_SAVE_AREA, - VectorRegister: [M128A, .. 26], + VectorRegister: [M128A; 26], VectorControl: DWORDLONG, DebugControl: 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/c.rs b/src/libstd/sys/windows/c.rs index 06259d61fcb..6cccefbe890 100644 --- a/src/libstd/sys/windows/c.rs +++ b/src/libstd/sys/windows/c.rs @@ -43,8 +43,8 @@ pub const WSA_WAIT_FAILED: libc::DWORD = libc::consts::os::extra::WAIT_FAILED; pub struct WSADATA { pub wVersion: libc::WORD, pub wHighVersion: libc::WORD, - pub szDescription: [u8, ..WSADESCRIPTION_LEN + 1], - pub szSystemStatus: [u8, ..WSASYS_STATUS_LEN + 1], + pub szDescription: [u8; WSADESCRIPTION_LEN + 1], + pub szSystemStatus: [u8; WSASYS_STATUS_LEN + 1], pub iMaxSockets: u16, pub iMaxUdpDg: u16, pub lpVendorInfo: *mut u8, @@ -57,8 +57,8 @@ pub struct WSADATA { pub iMaxSockets: u16, pub iMaxUdpDg: u16, pub lpVendorInfo: *mut u8, - pub szDescription: [u8, ..WSADESCRIPTION_LEN + 1], - pub szSystemStatus: [u8, ..WSASYS_STATUS_LEN + 1], + pub szDescription: [u8; WSADESCRIPTION_LEN + 1], + pub szSystemStatus: [u8; WSASYS_STATUS_LEN + 1], } pub type LPWSADATA = *mut WSADATA; @@ -66,7 +66,7 @@ pub type LPWSADATA = *mut WSADATA; #[repr(C)] pub struct WSANETWORKEVENTS { pub lNetworkEvents: libc::c_long, - pub iErrorCode: [libc::c_int, ..FD_MAX_EVENTS], + pub iErrorCode: [libc::c_int; FD_MAX_EVENTS], } pub type LPWSANETWORKEVENTS = *mut WSANETWORKEVENTS; @@ -76,7 +76,7 @@ pub type WSAEVENT = libc::HANDLE; #[repr(C)] pub struct fd_set { fd_count: libc::c_uint, - fd_array: [libc::SOCKET, ..FD_SETSIZE], + fd_array: [libc::SOCKET; FD_SETSIZE], } pub fn fd_set(set: &mut fd_set, s: libc::SOCKET) { diff --git a/src/libstd/sys/windows/os.rs b/src/libstd/sys/windows/os.rs index 0f26e36a80f..09003f87ff0 100644 --- a/src/libstd/sys/windows/os.rs +++ b/src/libstd/sys/windows/os.rs @@ -80,7 +80,7 @@ pub fn error_string(errnum: i32) -> String { // MAKELANGID(LANG_SYSTEM_DEFAULT, SUBLANG_SYS_DEFAULT) let langId = 0x0800 as DWORD; - let mut buf = [0 as WCHAR, ..TMPBUF_SZ]; + let mut buf = [0 as WCHAR; TMPBUF_SZ]; unsafe { let res = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | @@ -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 => { @@ -164,7 +164,7 @@ pub fn getcwd() -> IoResult<Path> { use libc::GetCurrentDirectoryW; use io::OtherIoError; - let mut buf = [0 as u16, ..BUF_BYTES]; + let mut buf = [0 as u16; BUF_BYTES]; unsafe { if libc::GetCurrentDirectoryW(buf.len() as DWORD, buf.as_mut_ptr()) == 0 as DWORD { return Err(IoError::last_error()); diff --git a/src/libstd/sys/windows/stack_overflow.rs b/src/libstd/sys/windows/stack_overflow.rs index bdf2e0bccb1..e8b447022cb 100644 --- a/src/libstd/sys/windows/stack_overflow.rs +++ b/src/libstd/sys/windows/stack_overflow.rs @@ -90,7 +90,7 @@ pub struct EXCEPTION_RECORD { pub ExceptionRecord: *mut EXCEPTION_RECORD, pub ExceptionAddress: LPVOID, pub NumberParameters: DWORD, - pub ExceptionInformation: [LPVOID, ..EXCEPTION_MAXIMUM_PARAMETERS] + pub ExceptionInformation: [LPVOID; EXCEPTION_MAXIMUM_PARAMETERS] } pub struct EXCEPTION_POINTERS { |
