Partial stabilization of once_cell#105587
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @m-ou-se (or someone else) soon. Please see the contribution instructions for more information. |
bbcbb34 to
c63c97a
Compare
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
Some changes occurred in src/tools/clippy cc @rust-lang/clippy Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
|
This needs FCP still @rustbot modify labels: +T-libs-api |
|
looks like you're stabilizing |
|
Updated, thanks for the catch |
|
If this PR about stabilization, why slapping |
cd3f10d to
e1f48a3
Compare
|
I just did not know if those were typically added at this time, since these functions are fairly good use cases. I have removed them, matklad suggested we can add them later Edit: Moved this to #105651 |
e1f48a3 to
5122f5c
Compare
|
@rfcbot merge |
|
Team member @m-ou-se has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
|
Finished benchmarking commit (8a7ca93): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. |
This PR aims to stabilize a portion of the
once_cellfeature:core::cell::OnceCellstd::cell::OnceCell(re-export of the above)std::sync::OnceLockThis will leave
LazyCellandLazyLockunstabilized, which have been moved to thelazy_cellfeature flag.Tracking issue: #74465 (does not fully close, but it may make sense to move to a new issue)
Future steps for separate PRs:
AddAdd #[inline] markers to once_cell methods #105651#[inline]to many methodsonce_cellcrateonce_cellcrateTo be stabilized API summary
No longer planned as part of this PR, and moved to the
rust_cell_tryfeature gate:I am new to this process so would appreciate mentorship wherever needed.
Post-merge update
With this merge,
LazyCellandLazyLockhave been moved under the gatelazy_cell(see #109736) and theget_or_try_initfunctions are underonce_cell_try(see #109737)