Skip to content

Tracking issue for once_lazy_lock_get_unchecked #162716

Open

Description

@malezjaa

Feature gate: #![feature(once_lazy_lock_get_unchecked)]

This is a tracking issue for the get_unchecked methods on OnceLock and
LazyLock.

The original implementation PR (#138914) was closed due to inactivity. Since
the ACP has been accepted and there is currently no active implementation PR,
this tracking issue is being opened to track the feature.

Public API

impl<T, F> LazyLock<T, F> {
    pub unsafe fn get_unchecked(this: &Self) -> &T;
    pub unsafe fn get_unchecked_mut(this: &mut Self) -> &mut T;
}
impl<T> OnceLock<T> {
    pub unsafe fn get_unchecked(&self) -> &T;
    pub unsafe fn get_unchecked_mut(&mut self) -> &mut T;
}

Steps / History

(Remember to update the S-tracking-* label when checking boxes.)

Unresolved Questions

  • None yet.

Footnotes

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

Activity

  1. added
    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
    T-libsRelevant to the library team, which will review and decide on the PR/issue.
    on Sep 13, 2026
  2. added a commit that references this issue on Sep 23, 2026
  3. added a commit that references this issue on Sep 23, 2026
  4. added a commit that references this issue on Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCS-tracking-unimplementedStatus: The feature has not been implemented.T-libsRelevant to the library team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions