Rollup merge of #127599 - tgross35:lazy_cell_consume-rename, r=workin… · model-checking/verify-rust-std@f937ef1 (original) (raw)

2 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -67,7 +67,7 @@ impl<T, F: FnOnce() -> T> LazyCell<T, F> {
67 67 /// # Examples
68 68 ///
69 69 /// ```
70 - /// #![feature(lazy_cell_consume)]
70 + /// #![feature(lazy_cell_into_inner)]
71 71 ///
72 72 /// use std::cell::LazyCell;
73 73 ///
@@ -78,7 +78,7 @@ impl<T, F: FnOnce() -> T> LazyCell<T, F> {
78 78 /// assert_eq!(&*lazy, "HELLO, WORLD!");
79 79 /// assert_eq!(LazyCell::into_inner(lazy).ok(), Some("HELLO, WORLD!".to_string()));
80 80 /// ```
81 - #[unstable(feature = "lazy_cell_consume", issue = "125623")]
81 + #[unstable(feature = "lazy_cell_into_inner", issue = "125623")]
82 82 pub fn into_inner(this: Self) -> Result<T, F> {
83 83 match this.state.into_inner() {
84 84 State::Init(data) => Ok(data),
Original file line number Diff line number Diff line change
@@ -107,7 +107,7 @@ impl<T, F: FnOnce() -> T> LazyLock<T, F> {
107 107 /// # Examples
108 108 ///
109 109 /// ```
110 - /// #![feature(lazy_cell_consume)]
110 + /// #![feature(lazy_cell_into_inner)]
111 111 ///
112 112 /// use std::sync::LazyLock;
113 113 ///
@@ -118,7 +118,7 @@ impl<T, F: FnOnce() -> T> LazyLock<T, F> {
118 118 /// assert_eq!(&*lazy, "HELLO, WORLD!");
119 119 /// assert_eq!(LazyLock::into_inner(lazy).ok(), Some("HELLO, WORLD!".to_string()));
120 120 /// ```
121 - #[unstable(feature = "lazy_cell_consume", issue = "125623")]
121 + #[unstable(feature = "lazy_cell_into_inner", issue = "125623")]
122 122 pub fn into_inner(mut this: Self) -> Result<T, F> {
123 123 let state = this.once.state();
124 124 match state {