Add 'feature' and 'since' to stability attributes

This commit is contained in:
Brian Anderson
2015-01-12 18:40:19 -08:00
parent 90aa581cff
commit 94ca8a3610
186 changed files with 2822 additions and 2561 deletions

View File

@@ -81,7 +81,7 @@
//! }
//! ```
#![stable]
#![stable(feature = "grandfathered", since = "1.0.0")]
/// A trait that types which have a useful default value should implement.
///
@@ -97,7 +97,7 @@
/// bar: f32,
/// }
/// ```
#[stable]
#[stable(feature = "grandfathered", since = "1.0.0")]
pub trait Default {
/// Returns the "default value" for a type.
///
@@ -131,16 +131,16 @@ pub trait Default {
/// fn default() -> Kind { Kind::A }
/// }
/// ```
#[stable]
#[stable(feature = "grandfathered", since = "1.0.0")]
fn default() -> Self;
}
macro_rules! default_impl {
($t:ty, $v:expr) => {
#[stable]
#[stable(feature = "grandfathered", since = "1.0.0")]
impl Default for $t {
#[inline]
#[stable]
#[stable(feature = "grandfathered", since = "1.0.0")]
fn default() -> $t { $v }
}
}