about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-07-11 17:01:39 +0200
committerGitHub <noreply@github.com>2024-07-11 17:01:39 +0200
commit47ab86653e916041a3653118e44b716f23dfe3eb (patch)
treec21c5752d21c8fc70f86b48edd17a21652d422d4
parenta10b4d1463dac935a53441e7cd85fa9df6231a6c (diff)
parentab56fe20533d843b0ad29e969c67e3e0f9c588bf (diff)
downloadrust-47ab86653e916041a3653118e44b716f23dfe3eb.tar.gz
rust-47ab86653e916041a3653118e44b716f23dfe3eb.zip
Rollup merge of #127599 - tgross35:lazy_cell_consume-rename, r=workingjubilee
Rename `lazy_cell_consume` to `lazy_cell_into_inner`

Name this something that is less confusable with an atomic consume API for `{Lazy,Once}Lock`.
-rw-r--r--library/core/src/cell/lazy.rs4
-rw-r--r--library/std/src/sync/lazy_lock.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/library/core/src/cell/lazy.rs b/library/core/src/cell/lazy.rs
index 7c7130ec075..21452d40f9d 100644
--- a/library/core/src/cell/lazy.rs
+++ b/library/core/src/cell/lazy.rs
@@ -67,7 +67,7 @@ impl<T, F: FnOnce() -> T> LazyCell<T, F> {
     /// # Examples
     ///
     /// ```
-    /// #![feature(lazy_cell_consume)]
+    /// #![feature(lazy_cell_into_inner)]
     ///
     /// use std::cell::LazyCell;
     ///
@@ -78,7 +78,7 @@ impl<T, F: FnOnce() -> T> LazyCell<T, F> {
     /// assert_eq!(&*lazy, "HELLO, WORLD!");
     /// assert_eq!(LazyCell::into_inner(lazy).ok(), Some("HELLO, WORLD!".to_string()));
     /// ```
-    #[unstable(feature = "lazy_cell_consume", issue = "125623")]
+    #[unstable(feature = "lazy_cell_into_inner", issue = "125623")]
     pub fn into_inner(this: Self) -> Result<T, F> {
         match this.state.into_inner() {
             State::Init(data) => Ok(data),
diff --git a/library/std/src/sync/lazy_lock.rs b/library/std/src/sync/lazy_lock.rs
index b70c041fa42..18906aceffa 100644
--- a/library/std/src/sync/lazy_lock.rs
+++ b/library/std/src/sync/lazy_lock.rs
@@ -107,7 +107,7 @@ impl<T, F: FnOnce() -> T> LazyLock<T, F> {
     /// # Examples
     ///
     /// ```
-    /// #![feature(lazy_cell_consume)]
+    /// #![feature(lazy_cell_into_inner)]
     ///
     /// use std::sync::LazyLock;
     ///
@@ -118,7 +118,7 @@ impl<T, F: FnOnce() -> T> LazyLock<T, F> {
     /// assert_eq!(&*lazy, "HELLO, WORLD!");
     /// assert_eq!(LazyLock::into_inner(lazy).ok(), Some("HELLO, WORLD!".to_string()));
     /// ```
-    #[unstable(feature = "lazy_cell_consume", issue = "125623")]
+    #[unstable(feature = "lazy_cell_into_inner", issue = "125623")]
     pub fn into_inner(mut this: Self) -> Result<T, F> {
         let state = this.once.state();
         match state {