about summary refs log tree commit diff
path: root/library/std/src/lazy.rs
AgeCommit message (Collapse)AuthorLines
2020-12-08Add (internal-only) SyncOnceCell::get_or_init_pin.Mara Bos-0/+55
2020-09-12Simplify SyncOnceCell's `take` and `drop`.Mara Bos-26/+13
2020-09-08Capitalize safety commentsFlying-Toast-3/+3
2020-09-05Add compile_fail test for SyncOnceCell's dropck issue.Mara Bos-1/+19
2020-09-05Fix dropck issue of SyncOnceCell.Mara Bos-1/+8
Fixes #76367.
2020-09-01Auto merge of #76047 - Dylan-DPC:rename/maybe, r=RalfJungbors-2/+2
rename get_{ref, mut} to assume_init_{ref,mut} in Maybeuninit References #63568 Rework with comments addressed from #66174 Have replaced most of the occurrences I've found, hopefully didn't miss out anything r? @RalfJung (thanks @danielhenrymantilla for the initial work on this)
2020-08-31std: move "mod tests/benches" to separate filesLzu Tao-330/+3
Also doing fmt inplace as requested.
2020-08-29rename get_{ref, mut} to assume_init_{ref,mut} in MaybeuninitDPC-2/+2
2020-08-25Suggest `mem::forget` if `mem::ManuallyDrop::new` isn't usedScott McMurray-1/+1
I think this communicates the intent better, and is shorter anyway.
2020-08-19Rollup merge of #75696 - matklad:mirit, r=RalfJungTyler Mandry-24/+4
Remove `#[cfg(miri)]` from OnceCell tests They were carried over from once_cell crate, but they are not entirely correct (as miri now supports more things), and we don't run miri tests for std, so let's just remove them. Maybe one day we'll run miri in std, but then we can just re-install these attributes.
2020-08-19Remove `#[cfg(miri)]` from OnceCell testsAleksey Kladov-24/+4
They were carried over from once_cell crate, but they are not entirely correct (as miri now supports more things), and we don't run miri tests for std, so let's just remove them. Maybe one day we'll run miri in std, but then we can just re-install these attributes.
2020-08-18Make OnceCell<T> transparent to dropckAleksey Kladov-2/+12
See the failed build in https://github.com/rust-lang/rust/pull/75555#issuecomment-675016718 for an example where we need this in real life
2020-07-28Fix RefUnwindSafe & UnwinsSafe impls for lazy::SyncLazyAleksey Kladov-1/+3
The logic here is the same as for Send&Sync impls.
2020-07-27mv std libs to library/mark-0/+846