Open tspiteri opened 6 months ago
@tspiteri Would you be so kind as to make the tracking issue? (you could even just edit this one) We can edit it from there if we need to change things.
Could this be renamed to lazy_cell_into_inner
? I keep thinking this is is referencing an API that uses atomic consume operations, which was discussed for the implementation of OnceLock
/LazyLock
but ultimately rejected (e.g. here).
Go for it.
I was mostly asking for someone to rename the issue, but here we go https://github.com/rust-lang/rust/pull/127599. Rustbot has really been spot on picking reviewers for me recently.
Could this be considered for stabilization? This serves the same purpose as into_inner
methods available on other cell and sync types, and the signature is consistent with once_cell
's Lazy::into_value
.
The only downside I see here is that .unwrap()
doesn't work since the closure doesn't implement Debug
.
@rustbot label +I-libs-api-nominated
This superceded #109736 now that the
lazy_cell
feature has been stabilized.Feature gate:
#[feature(lazy_cell_into_inner)]
This is a tracking issue for
LazyCell::into_inner
andLazyLock::into_inner
.Public API
Steps / History
Unresolved Questions