Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf937ef1

Browse files
authored
Rollup merge ofrust-lang#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`.
2 parentsfde7fd2 +b71b538 commitf937ef1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎core/src/cell/lazy.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ impl<T, F: FnOnce() -> T> LazyCell<T, F> {
6767
/// # Examples
6868
///
6969
/// ```
70-
/// #![feature(lazy_cell_consume)]
70+
/// #![feature(lazy_cell_into_inner)]
7171
///
7272
/// use std::cell::LazyCell;
7373
///
@@ -78,7 +78,7 @@ impl<T, F: FnOnce() -> T> LazyCell<T, F> {
7878
/// assert_eq!(&*lazy, "HELLO, WORLD!");
7979
/// assert_eq!(LazyCell::into_inner(lazy).ok(), Some("HELLO, WORLD!".to_string()));
8080
/// ```
81-
#[unstable(feature ="lazy_cell_consume", issue ="125623")]
81+
#[unstable(feature ="lazy_cell_into_inner", issue ="125623")]
8282
pubfninto_inner(this:Self) ->Result<T,F>{
8383
match this.state.into_inner(){
8484
State::Init(data) =>Ok(data),

‎std/src/sync/lazy_lock.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ impl<T, F: FnOnce() -> T> LazyLock<T, F> {
107107
/// # Examples
108108
///
109109
/// ```
110-
/// #![feature(lazy_cell_consume)]
110+
/// #![feature(lazy_cell_into_inner)]
111111
///
112112
/// use std::sync::LazyLock;
113113
///
@@ -118,7 +118,7 @@ impl<T, F: FnOnce() -> T> LazyLock<T, F> {
118118
/// assert_eq!(&*lazy, "HELLO, WORLD!");
119119
/// assert_eq!(LazyLock::into_inner(lazy).ok(), Some("HELLO, WORLD!".to_string()));
120120
/// ```
121-
#[unstable(feature ="lazy_cell_consume", issue ="125623")]
121+
#[unstable(feature ="lazy_cell_into_inner", issue ="125623")]
122122
pubfninto_inner(mutthis:Self) ->Result<T,F>{
123123
let state = this.once.state();
124124
match state{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp