about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-04-08 16:41:14 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-04-08 16:49:49 -0700
commit561fdec1350056d77245a17d59c7d740c95621d1 (patch)
treea22e5207a5bc9b7a53b55c4d26a56fdefc97419d /src/libstd/sys
parent926f38e588bb99aff1902fa94ab82b1db89cbbce (diff)
downloadrust-561fdec1350056d77245a17d59c7d740c95621d1.tar.gz
rust-561fdec1350056d77245a17d59c7d740c95621d1.zip
std: Stabilize io::Error::from_raw_os_error
This commit stabilizes the old `io::Error::from_os_error` after being renamed to
use the `raw_os_error` terminology instead. This function is often useful when
writing bindings to OS functions but only actually converting to an I/O error at
a later point.
Diffstat (limited to 'src/libstd/sys')
-rw-r--r--src/libstd/sys/unix/process2.rs2
-rw-r--r--src/libstd/sys/unix/thread.rs2
-rw-r--r--src/libstd/sys/windows/net.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/sys/unix/process2.rs b/src/libstd/sys/unix/process2.rs
index c2a8b26aef4..60f00c80b4a 100644
--- a/src/libstd/sys/unix/process2.rs
+++ b/src/libstd/sys/unix/process2.rs
@@ -193,7 +193,7 @@ impl Process {
                                 let errno = combine(&bytes[0.. 4]);
                                 assert!(p.wait().is_ok(),
                                         "wait() should either return Ok or panic");
-                                return Err(Error::from_os_error(errno))
+                                return Err(Error::from_raw_os_error(errno))
                             }
                             Ok(0) => return Ok(p),
                             Err(ref e) if e.kind() == ErrorKind::Interrupted => {}
diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs
index eb61f21aacd..73d6cd73621 100644
--- a/src/libstd/sys/unix/thread.rs
+++ b/src/libstd/sys/unix/thread.rs
@@ -212,7 +212,7 @@ pub unsafe fn create(stack: usize, p: Thunk) -> io::Result<rust_thread> {
     assert_eq!(pthread_attr_destroy(&mut attr), 0);
 
     return if ret != 0 {
-        Err(io::Error::from_os_error(ret))
+        Err(io::Error::from_raw_os_error(ret))
     } else {
         mem::forget(p); // ownership passed to pthread_create
         Ok(native)
diff --git a/src/libstd/sys/windows/net.rs b/src/libstd/sys/windows/net.rs
index 12a8ef99d76..5ced8863e62 100644
--- a/src/libstd/sys/windows/net.rs
+++ b/src/libstd/sys/windows/net.rs
@@ -43,7 +43,7 @@ pub fn init() {
 
 /// Returns the last error from the Windows socket interface.
 fn last_error() -> io::Error {
-    io::Error::from_os_error(unsafe { c::WSAGetLastError() })
+    io::Error::from_raw_os_error(unsafe { c::WSAGetLastError() })
 }
 
 /// Checks if the signed integer is the Windows constant `SOCKET_ERROR` (-1)