From 94ca8a361026d1a622a961e8dc8cacc331ed1ac3 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Mon, 12 Jan 2015 18:40:19 -0800 Subject: Add 'feature' and 'since' to stability attributes --- src/libstd/error.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/libstd/error.rs') diff --git a/src/libstd/error.rs b/src/libstd/error.rs index ff128461978..91603fb7119 100644 --- a/src/libstd/error.rs +++ b/src/libstd/error.rs @@ -78,7 +78,7 @@ //! } //! ``` -#![stable] +#![stable(feature = "grandfathered", since = "1.0.0")] use prelude::v1::*; @@ -86,7 +86,8 @@ use str::Utf8Error; use string::{FromUtf8Error, FromUtf16Error}; /// Base functionality for all errors in Rust. -#[unstable = "the exact API of this trait may change"] +#[unstable(feature = "unnamed_feature", since = "1.0.0", + reason = "the exact API of this trait may change")] pub trait Error { /// A short description of the error; usually a static string. fn description(&self) -> &str; @@ -99,21 +100,21 @@ pub trait Error { } /// A trait for types that can be converted from a given error type `E`. -#[stable] +#[stable(feature = "grandfathered", since = "1.0.0")] pub trait FromError { /// Perform the conversion. fn from_error(err: E) -> Self; } // Any type is convertable from itself -#[stable] +#[stable(feature = "grandfathered", since = "1.0.0")] impl FromError for E { fn from_error(err: E) -> E { err } } -#[stable] +#[stable(feature = "grandfathered", since = "1.0.0")] impl Error for Utf8Error { fn description(&self) -> &str { match *self { @@ -125,13 +126,13 @@ impl Error for Utf8Error { fn detail(&self) -> Option { Some(self.to_string()) } } -#[stable] +#[stable(feature = "grandfathered", since = "1.0.0")] impl Error for FromUtf8Error { fn description(&self) -> &str { "invalid utf-8" } fn detail(&self) -> Option { Some(self.to_string()) } } -#[stable] +#[stable(feature = "grandfathered", since = "1.0.0")] impl Error for FromUtf16Error { fn description(&self) -> &str { "invalid utf-16" } } -- cgit 1.4.1-3-g733a5