From ac77392f8ab1c201b0c927f6a2d30b632b95acda Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 31 Mar 2015 16:01:03 -0700 Subject: 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>` 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` 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] --- src/librustc_driver/lib.rs | 1 - src/librustc_driver/pretty.rs | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'src/librustc_driver') diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index 456d5f7a60a..f087a2c742b 100644 --- a/src/librustc_driver/lib.rs +++ b/src/librustc_driver/lib.rs @@ -35,7 +35,6 @@ #![feature(unsafe_destructor)] #![feature(staged_api)] #![feature(exit_status)] -#![feature(io)] #![feature(set_stdio)] #![feature(unicode)] #![feature(convert)] diff --git a/src/librustc_driver/pretty.rs b/src/librustc_driver/pretty.rs index 9e693a64ef0..fe55ca3b73b 100644 --- a/src/librustc_driver/pretty.rs +++ b/src/librustc_driver/pretty.rs @@ -699,8 +699,8 @@ fn print_flowgraph(variants: Vec, fn expand_err_details(r: io::Result<()>) -> io::Result<()> { r.map_err(|ioerr| { - io::Error::new(io::ErrorKind::Other, "graphviz::render failed", - Some(ioerr.to_string())) + io::Error::new(io::ErrorKind::Other, + &format!("graphviz::render failed: {}", ioerr)[..]) }) } } -- cgit 1.4.1-3-g733a5