Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking Issue for lazy_cell_into_inner #125623

Open
1 of 3 tasks
tspiteri opened this issue May 27, 2024 · 4 comments
Open
1 of 3 tasks

Tracking Issue for lazy_cell_into_inner #125623

tspiteri opened this issue May 27, 2024 · 4 comments
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@tspiteri
Copy link
Contributor

tspiteri commented May 27, 2024

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 and LazyLock::into_inner.

Public API

// core::cell (in core/src/cell/lazy.rs)

impl<T, F: FnOnce() -> T> LazyCell<T, F> {
    pub fn into_inner(this: Self) -> Result<T, F>;
}
// std::sync (in std/sync/lazy_lock.rs)

impl<T, F: FnOnce() -> T> LazyLock<T, F> {
    pub fn into_inner(this: Self) -> Result<T, F>;
}

Steps / History

Unresolved Questions

  • None yet.

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label May 27, 2024
@workingjubilee
Copy link
Contributor

workingjubilee commented May 27, 2024

@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.

@tspiteri tspiteri changed the title doc for unstable method LazyLock::into_inner links to closed tracking issue Tracking Issue for lazy_cell_consume May 28, 2024
@workingjubilee workingjubilee added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels May 29, 2024
@tgross35
Copy link
Contributor

tgross35 commented Jul 10, 2024

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).

@workingjubilee
Copy link
Contributor

Go for it.

@tgross35
Copy link
Contributor

I was mostly asking for someone to rename the issue, but here we go #127599. Rustbot has really been spot on picking reviewers for me recently.

@workingjubilee workingjubilee changed the title Tracking Issue for lazy_cell_consume Tracking Issue for lazy_cell_into_inner Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants