about summary refs log tree commit diff
path: root/library/std/src/sync/once_lock.rs
AgeCommit message (Collapse)AuthorLines
2023-10-13Implement `OnceCell/Lock::try_insert()`daxpedda-3/+40
2023-07-31Rollup merge of #109318 - joboet:better_fmt_placeholder, r=dtolnayMatthias Krüger-3/+5
Make `Debug` representations of `[Lazy, Once]*[Cell, Lock]` consistent with `Mutex` and `RwLock` `Mutex` prints `<locked>` as a field value when its inner value cannot be accessed, but the lazy types print a fixed string like "`OnceCell(Uninit)`". This could cause confusion if the inner type is a unit type named `Uninit` and does not respect the pretty-printing flag. With this change, the format message is now "`OnceCell(<uninit>)`", consistent with `Mutex`.
2023-04-28replace version placeholdersPietro Albini-20/+20
2023-04-19std: make `Debug` representations of `[Lazy, Once]*[Cell, Lock]` consistent ↵joboet-3/+5
with `Mutex` and `RwLock` `Mutex` prints `<locked>` as a field value when its inner value cannot be accessed, but the lazy types print a fixed string like "`OnceCell(Uninit)`". This could cause confusion if the inner type is a unit type named `Uninit` and does not respect the pretty-printing flag. With this change, the format message is now "`OnceCell(<uninit>)`", consistent with `Mutex`.
2023-04-16rm const traits in libcoreDeadbeef-2/+1
2023-03-29Stabilize a portion of 'once_cell'Trevor Gross-37/+22
Move items not part of this stabilization to 'lazy_cell' or 'once_cell_try'
2022-12-13Add #[inline] marker to OnceCell/LazyCell/OnceLock/LazyLockTrevor Gross-1/+16
2022-11-17Properly link `{Once,Lazy}{Cell,Lock}` in docsMaybe Waffle-2/+4
2022-09-03std: make `ReentrantMutex` movable and `const`; simplify `Stdout` initializationjoboet-55/+0
2022-06-16Move/rename `lazy::Sync{OnceCell,Lazy}` to `sync::{Once,Lazy}Lock`Maybe Waffle-0/+496