diff options
| author | bors <bors@rust-lang.org> | 2014-10-02 03:07:17 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-10-02 03:07:17 +0000 |
| commit | 07b2c1be9dad53272575844efedfb7314fc4fb84 (patch) | |
| tree | d26dab000c4444cf6e972bb30da0392e675ca52b /src/libnative | |
| parent | d53874eccf0657d5d9c0a9ed9f84380d27d1c423 (diff) | |
| parent | 6e0611a48707a1f5d90aee32a02b2b15957ef25b (diff) | |
| download | rust-07b2c1be9dad53272575844efedfb7314fc4fb84.tar.gz rust-07b2c1be9dad53272575844efedfb7314fc4fb84.zip | |
auto merge of #17620 : nick29581/rust/slice4, r=aturon
cc @aturon r? anyone?
Diffstat (limited to 'src/libnative')
| -rw-r--r-- | src/libnative/io/net.rs | 2 | ||||
| -rw-r--r-- | src/libnative/io/pipe_windows.rs | 2 | ||||
| -rw-r--r-- | src/libnative/lib.rs | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/src/libnative/io/net.rs b/src/libnative/io/net.rs index 419748b75c3..aa2b1a6f14e 100644 --- a/src/libnative/io/net.rs +++ b/src/libnative/io/net.rs @@ -1012,7 +1012,7 @@ pub fn write<T>(fd: sock_t, // Also as with read(), we use MSG_DONTWAIT to guard ourselves // against unforeseen circumstances. let _guard = lock(); - let ptr = buf.slice_from(written).as_ptr(); + let ptr = buf[written..].as_ptr(); let len = buf.len() - written; match retry(|| write(deadline.is_some(), ptr, len)) { -1 if util::wouldblock() => {} diff --git a/src/libnative/io/pipe_windows.rs b/src/libnative/io/pipe_windows.rs index 2de9cd9a41c..5475de6d7e1 100644 --- a/src/libnative/io/pipe_windows.rs +++ b/src/libnative/io/pipe_windows.rs @@ -448,7 +448,7 @@ impl rtio::RtioPipe for UnixStream { } let ret = unsafe { libc::WriteFile(self.handle(), - buf.slice_from(offset).as_ptr() as libc::LPVOID, + buf[offset..].as_ptr() as libc::LPVOID, (buf.len() - offset) as libc::DWORD, &mut bytes_written, &mut overlapped) diff --git a/src/libnative/lib.rs b/src/libnative/lib.rs index 267ff3d2a81..5def99d8ef3 100644 --- a/src/libnative/lib.rs +++ b/src/libnative/lib.rs @@ -57,7 +57,8 @@ #![deny(unused_result, unused_must_use)] #![allow(non_camel_case_types, deprecated)] -#![feature(default_type_params, lang_items)] +#![allow(unknown_features)] +#![feature(default_type_params, lang_items, slicing_syntax)] // NB this crate explicitly does *not* allow glob imports, please seriously // consider whether they're needed before adding that feature here (the |
