-
Notifications
You must be signed in to change notification settings - Fork 13k
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_get
#129333
Comments
…ake-2, r=Amanieu Implement ACP 429: add `Lazy{Cell,Lock}::get[_mut]` and `force_mut` Tracking issue for `lazy_get`: rust-lang#129333
…ake-2, r=Amanieu Implement ACP 429: add `Lazy{Cell,Lock}::get[_mut]` and `force_mut` Tracking issue for `lazy_get`: rust-lang#129333
Rollup merge of rust-lang#130476 - workingjubilee:more-lazy-methods-take-2, r=Amanieu Implement ACP 429: add `Lazy{Cell,Lock}::get[_mut]` and `force_mut` Tracking issue for `lazy_get`: rust-lang#129333
The docs for
The examples are right through. |
@jalil-salame Why is that backwards? That seems correct to me. |
Get should get a reference not a mutable reference Get mut should get a mutable reference not a reference |
…=tgross35 fix(LazyCell): documentation of get[_mut] was wrong - `LazyCell::get`: said it was returning a **mutable** reference. - `LazyCell::get_mut`: said it was returning a reference (the mutable was missing). Related to rust-lang#129333 (`lazy_get`). `LazyLock`'s documentation was correct.
…=tgross35 fix(LazyCell): documentation of get[_mut] was wrong - `LazyCell::get`: said it was returning a **mutable** reference. - `LazyCell::get_mut`: said it was returning a reference (the mutable was missing). Related to rust-lang#129333 (`lazy_get`). `LazyLock`'s documentation was correct.
…=tgross35 fix(LazyCell): documentation of get[_mut] was wrong - `LazyCell::get`: said it was returning a **mutable** reference. - `LazyCell::get_mut`: said it was returning a reference (the mutable was missing). Related to rust-lang#129333 (`lazy_get`). `LazyLock`'s documentation was correct.
Rollup merge of rust-lang#134452 - jalil-salame:fix-lazy-cell-docs, r=tgross35 fix(LazyCell): documentation of get[_mut] was wrong - `LazyCell::get`: said it was returning a **mutable** reference. - `LazyCell::get_mut`: said it was returning a reference (the mutable was missing). Related to rust-lang#129333 (`lazy_get`). `LazyLock`'s documentation was correct.
Feature gate:
#![feature(lazy_get)]
This is a tracking issue for
LazyCell/Lock::get[_mut]()
, allowing you to extract a reference from aLazy
only if it is initialized, approved in ACP rust-lang/libs-team#429.Public API
Steps / History
LazyLock/Cell
get_mut()
andDerefMut
libs-team#429DerefMut
toLazy[Cell/Lock]
#129334Lazy{Cell,Lock}::get[_mut]
andforce_mut
#130476Unresolved Questions
Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩
The text was updated successfully, but these errors were encountered: