about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/io/error.rs12
-rw-r--r--src/libstd/macros.rs1
-rw-r--r--src/libstd/net/addr.rs3
-rw-r--r--src/libstd/rt/unwind.rs3
-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
7 files changed, 15 insertions, 10 deletions
diff --git a/src/libstd/io/error.rs b/src/libstd/io/error.rs
index b84dcb8fb62..7428d0a8e35 100644
--- a/src/libstd/io/error.rs
+++ b/src/libstd/io/error.rs
@@ -163,12 +163,18 @@ impl Error {
     /// `Error` for the error code.
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn last_os_error() -> Error {
-        Error::from_os_error(sys::os::errno() as i32)
+        Error::from_raw_os_error(sys::os::errno() as i32)
     }
 
     /// Creates a new instance of an `Error` from a particular OS error code.
-    #[unstable(feature = "io",
-               reason = "unclear whether this function is necessary")]
+    #[stable(feature = "rust1", since = "1.0.0")]
+    pub fn from_raw_os_error(code: i32) -> Error {
+        Error { repr: Repr::Os(code) }
+    }
+
+    /// Creates a new instance of an `Error` from a particular OS error code.
+    #[unstable(feature = "io", reason = "deprecated")]
+    #[deprecated(since = "1.0.0", reason = "renamed to from_raw_os_error")]
     pub fn from_os_error(code: i32) -> Error {
         Error { repr: Repr::Os(code) }
     }
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs
index b3d1adb4421..3d10c151f80 100644
--- a/src/libstd/macros.rs
+++ b/src/libstd/macros.rs
@@ -37,6 +37,7 @@
 /// ```
 #[macro_export]
 #[stable(feature = "rust1", since = "1.0.0")]
+#[allow_internal_unstable]
 macro_rules! panic {
     () => ({
         panic!("explicit panic")
diff --git a/src/libstd/net/addr.rs b/src/libstd/net/addr.rs
index 886f252fb19..18d8fcc8a52 100644
--- a/src/libstd/net/addr.rs
+++ b/src/libstd/net/addr.rs
@@ -750,8 +750,9 @@ mod tests {
         assert!(tsa("localhost:23924").unwrap().contains(&a));
     }
 
+    // FIXME: figure out why this fails on bitrig and fix it
     #[test]
-    #[cfg(not(windows))]
+    #[cfg(not(any(windows, target_os = "bitrig")))]
     fn to_socket_addr_str_bad() {
         assert!(tsa("1200::AB00:1234::2552:7777:1313:34300").is_err());
     }
diff --git a/src/libstd/rt/unwind.rs b/src/libstd/rt/unwind.rs
index f71811b1ead..2f58a437eb4 100644
--- a/src/libstd/rt/unwind.rs
+++ b/src/libstd/rt/unwind.rs
@@ -495,7 +495,6 @@ pub extern fn rust_begin_unwind(msg: fmt::Arguments,
 /// on (e.g.) the inlining of other functions as possible), by moving
 /// the actual formatting into this shared place.
 #[inline(never)] #[cold]
-#[stable(since = "1.0.0", feature = "rust1")]
 pub fn begin_unwind_fmt(msg: fmt::Arguments, file_line: &(&'static str, usize)) -> ! {
     use fmt::Write;
 
@@ -511,7 +510,6 @@ pub fn begin_unwind_fmt(msg: fmt::Arguments, file_line: &(&'static str, usize))
 
 /// This is the entry point of unwinding for panic!() and assert!().
 #[inline(never)] #[cold] // avoid code bloat at the call sites as much as possible
-#[stable(since = "1.0.0", feature = "rust1")]
 pub fn begin_unwind<M: Any + Send>(msg: M, file_line: &(&'static str, usize)) -> ! {
     // Note that this should be the only allocation performed in this code path.
     // Currently this means that panic!() on OOM will invoke this code path,
@@ -598,7 +596,6 @@ fn begin_unwind_inner(msg: Box<Any + Send>,
 /// Only a limited number of callbacks can be registered, and this function
 /// returns whether the callback was successfully registered or not. It is not
 /// currently possible to unregister a callback once it has been registered.
-#[unstable(feature = "std_misc")]
 pub unsafe fn register(f: Callback) -> bool {
     match CALLBACK_CNT.fetch_add(1, Ordering::SeqCst) {
         // The invocation code has knowledge of this window where the count has
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)