diff options
| author | Brian Anderson <banderson@mozilla.com> | 2015-01-12 18:40:19 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2015-01-21 16:16:18 -0800 |
| commit | 94ca8a361026d1a622a961e8dc8cacc331ed1ac3 (patch) | |
| tree | 58179e85714f0a1ee618a8a9982aadbeb65822cf /src/libstd/sync/once.rs | |
| parent | 90aa581cff54ed1bb5f53ee2ead3764fca94fdf3 (diff) | |
| download | rust-94ca8a361026d1a622a961e8dc8cacc331ed1ac3.tar.gz rust-94ca8a361026d1a622a961e8dc8cacc331ed1ac3.zip | |
Add 'feature' and 'since' to stability attributes
Diffstat (limited to 'src/libstd/sync/once.rs')
| -rw-r--r-- | src/libstd/sync/once.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/sync/once.rs b/src/libstd/sync/once.rs index 6231a91833d..82ed62966b5 100644 --- a/src/libstd/sync/once.rs +++ b/src/libstd/sync/once.rs @@ -36,7 +36,7 @@ use sync::{StaticMutex, MUTEX_INIT}; /// // run initialization here /// }); /// ``` -#[stable] +#[stable(feature = "grandfathered", since = "1.0.0")] pub struct Once { mutex: StaticMutex, cnt: AtomicIsize, @@ -46,7 +46,7 @@ pub struct Once { unsafe impl Sync for Once {} /// Initialization value for static `Once` values. -#[stable] +#[stable(feature = "grandfathered", since = "1.0.0")] pub const ONCE_INIT: Once = Once { mutex: MUTEX_INIT, cnt: ATOMIC_ISIZE_INIT, @@ -63,7 +63,7 @@ impl Once { /// /// When this function returns, it is guaranteed that some initialization /// has run and completed (it may not be the closure specified). - #[stable] + #[stable(feature = "grandfathered", since = "1.0.0")] pub fn call_once<F>(&'static self, f: F) where F: FnOnce() { // Optimize common path: load is much cheaper than fetch_add. if self.cnt.load(Ordering::SeqCst) < 0 { |
