about summary refs log tree commit diff
path: root/src/librustc_back/target
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-03-31 16:01:03 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-03-31 16:12:48 -0700
commitac77392f8ab1c201b0c927f6a2d30b632b95acda (patch)
treef5c43d1b5cfdc7ce32e2c741c45c7e170e28c9cf /src/librustc_back/target
parent80bf31dd514055177b22c3dc66836d39eb5b1648 (diff)
downloadrust-ac77392f8ab1c201b0c927f6a2d30b632b95acda.tar.gz
rust-ac77392f8ab1c201b0c927f6a2d30b632b95acda.zip
std: Stabilize last bits of io::Error
This commit stabilizes a few remaining bits of the `io::Error` type:

* The `Error::new` method is now stable. The last `detail` parameter was removed
  and the second `desc` parameter was generalized to `E: Into<Box<Error>>` to
  allow creating an I/O error from any form of error. Currently there is no form
  of downcasting, but this will be added in time.

* An implementation of `From<&str> for Box<Error>` was added to liballoc to
  allow construction of errors from raw strings.

* The `Error::raw_os_error` method was stabilized as-is.

* Trait impls for `Clone`, `Eq`, and `PartialEq` were removed from `Error` as it
  is not possible to use them with trait objects.

This is a breaking change due to the modification of the `new` method as well as
the removal of the trait implementations for the `Error` type.

[breaking-change]
Diffstat (limited to 'src/librustc_back/target')
-rw-r--r--src/librustc_back/target/apple_ios_base.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/librustc_back/target/apple_ios_base.rs b/src/librustc_back/target/apple_ios_base.rs
index 2fbbe7d1f7c..42cbdd7577d 100644
--- a/src/librustc_back/target/apple_ios_base.rs
+++ b/src/librustc_back/target/apple_ios_base.rs
@@ -47,9 +47,10 @@ pub fn get_sdk_root(sdk_name: &str) -> String {
                               Ok(String::from_utf8(output.stdout).unwrap())
                           } else {
                               let error = String::from_utf8(output.stderr);
+                              let error = format!("process exit with error: {}",
+                                                  error.unwrap());
                               Err(io::Error::new(io::ErrorKind::Other,
-                                                 "process exit with error",
-                                                 error.ok()))
+                                                 &error[..]))
                           }
                       });