diff --git a/src/libstd/error.rs b/src/libstd/error.rs index e115263d2eb95..bae370688f6ea 100644 --- a/src/libstd/error.rs +++ b/src/libstd/error.rs @@ -161,14 +161,14 @@ pub trait Error: Debug + Display { #[stable(feature = "rust1", since = "1.0.0")] impl<'a, E: Error + 'a> From for Box { - fn from(err: E) -> Box { + default fn from(err: E) -> Box { Box::new(err) } } #[stable(feature = "rust1", since = "1.0.0")] impl<'a, E: Error + Send + Sync + 'a> From for Box { - fn from(err: E) -> Box { + default fn from(err: E) -> Box { Box::new(err) } } @@ -278,7 +278,7 @@ impl Error for char::DecodeUtf16Error { } #[stable(feature = "box_error", since = "1.7.0")] -impl Error for Box { +impl Error for Box { fn description(&self) -> &str { Error::description(&**self) } diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 070690773b6c4..6bb512187f705 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -292,6 +292,7 @@ #![feature(slice_bytes)] #![feature(slice_concat_ext)] #![feature(slice_patterns)] +#![feature(specialization)] #![feature(staged_api)] #![feature(stmt_expr_attributes)] #![feature(str_char)]