diff options
| author | Pietro Albini <pietro.albini@ferrous-systems.com> | 2024-06-10 14:50:54 +0200 |
|---|---|---|
| committer | Pietro Albini <pietro.albini@ferrous-systems.com> | 2024-06-11 16:52:02 +0200 |
| commit | be9e27e490c9fb9fa4b3c962daa1fbd3acbc58ee (patch) | |
| tree | 672d600ec834e9b584e7d114610089e5b59cd2db /library/core/src/cell | |
| parent | 534b5855a6baf6da084c261593cdfb84cec01755 (diff) | |
replace version placeholder
Diffstat (limited to 'library/core/src/cell')
| -rw-r--r-- | library/core/src/cell/lazy.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/library/core/src/cell/lazy.rs b/library/core/src/cell/lazy.rs index 80b85b95446..7c7130ec075 100644 --- a/library/core/src/cell/lazy.rs +++ b/library/core/src/cell/lazy.rs @@ -34,7 +34,7 @@ enum State<T, F> { /// // 92 /// // 92 /// ``` -#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "lazy_cell", since = "1.80.0")] pub struct LazyCell<T, F = fn() -> T> { state: UnsafeCell<State<T, F>>, } @@ -54,8 +54,8 @@ impl<T, F: FnOnce() -> T> LazyCell<T, F> { /// assert_eq!(&*lazy, "HELLO, WORLD!"); /// ``` #[inline] - #[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "lazy_cell", since = "1.80.0")] + #[rustc_const_stable(feature = "lazy_cell", since = "1.80.0")] pub const fn new(f: F) -> LazyCell<T, F> { LazyCell { state: UnsafeCell::new(State::Uninit(f)) } } @@ -103,7 +103,7 @@ impl<T, F: FnOnce() -> T> LazyCell<T, F> { /// assert_eq!(&*lazy, &92); /// ``` #[inline] - #[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "lazy_cell", since = "1.80.0")] pub fn force(this: &LazyCell<T, F>) -> &T { // SAFETY: // This invalidates any mutable references to the data. The resulting @@ -167,7 +167,7 @@ impl<T, F> LazyCell<T, F> { } } -#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "lazy_cell", since = "1.80.0")] impl<T, F: FnOnce() -> T> Deref for LazyCell<T, F> { type Target = T; #[inline] @@ -176,7 +176,7 @@ impl<T, F: FnOnce() -> T> Deref for LazyCell<T, F> { } } -#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "lazy_cell", since = "1.80.0")] impl<T: Default> Default for LazyCell<T> { /// Creates a new lazy value using `Default` as the initializing function. #[inline] @@ -185,7 +185,7 @@ impl<T: Default> Default for LazyCell<T> { } } -#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "lazy_cell", since = "1.80.0")] impl<T: fmt::Debug, F> fmt::Debug for LazyCell<T, F> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let mut d = f.debug_tuple("LazyCell"); |
