summary refs log tree commit diff
path: root/src/libstd/sync
AgeCommit message (Collapse)AuthorLines
2020-04-03Fix "since" field for `Once::is_complete`'s `#[stable]` attributeLukas Kalbertodt-1/+1
It was accidentally merged with the wrong version.
2020-03-07Rollup merge of #69773 - matthiaskrgr:typos, r=petrochenkovMazdak Farrokhzad-1/+1
fix various typos
2020-03-06Don't redundantly repeat field names (clippy::redundant_field_names)Matthias Krüger-6/+3
2020-03-06fix various typosMatthias Krüger-1/+1
2020-02-07Stabilize Once::is_completedMichael Bradshaw-6/+5
2020-01-14Auto merge of #67076 - mbrubeck:condvar, r=dtolnaybors-43/+34
Stabilize Condvar::wait_while and wait_timeout_while (previously wait_until, wait_timeout_until) Closes #47960.
2020-01-08Use matches macro in libcore and libstdIgor Aleksanov-10/+2
2019-12-28Rollup merge of #67632 - kraai:remove-collapsed-reference-links, r=steveklabnikOliver Scherer-5/+5
Convert collapsed to shortcut reference links
2019-12-26Rename wait_until/wait_timeout_until to wait_while/white_timeout_whileMatt Brubeck-36/+32
2019-12-26Stabilize Condvar::wait_until and wait_timeout_untilMatt Brubeck-7/+2
2019-12-26Convert collapsed to shortcut reference linksMatthew Kraai-5/+5
2019-12-26Remove redundant link textsMatthew Kraai-1/+1
2019-12-24Deprecate Error::description for realDavid Tolnay-0/+5
`description` has been documented as soft-deprecated since 1.27.0 (17 months ago). There is no longer any reason to call it or implement it. This commit: - adds #[rustc_deprecated(since = "1.41.0")] to Error::description; - moves description (and cause, which is also deprecated) below the source and backtrace methods in the Error trait; - reduces documentation of description and cause to take up much less vertical real estate in rustdocs, while preserving the example that shows how to render errors without needing to call description; - removes the description function of all *currently unstable* Error impls in the standard library; - marks #[allow(deprecated)] the description function of all *stable* Error impls in the standard library; - replaces miscellaneous uses of description in example code and the compiler.
2019-12-22Format the worldMark Rousskov-112/+121
2019-12-18Propagate cfg bootstrapMark Rousskov-1/+1
2019-12-13Require stable/unstable annotations for the constness of all stable ↵Oliver Scherer-0/+1
functions with a `const` modifier
2019-12-06get rid of __ in field namesRalf Jung-26/+24
2019-11-29Format libstd with rustfmtDavid Tolnay-485/+499
This commit applies rustfmt with rust-lang/rust's default settings to files in src/libstd *that are not involved in any currently open PR* to minimize merge conflicts. THe list of files involved in open PRs was determined by querying GitHub's GraphQL API with this script: https://gist.github.com/dtolnay/aa9c34993dc051a4f344d1b10e4487e8 With the list of files from the script in outstanding_files, the relevant commands were: $ find src/libstd -name '*.rs' \ | xargs rustfmt --edition=2018 --unstable-features --skip-children $ rg libstd outstanding_files | xargs git checkout -- Repeating this process several months apart should get us coverage of most of the rest of libstd. To confirm no funny business: $ git checkout $THIS_COMMIT^ $ git show --pretty= --name-only $THIS_COMMIT \ | xargs rustfmt --edition=2018 --unstable-features --skip-children $ git diff $THIS_COMMIT # there should be no difference
2019-11-09Run rustfmt on libstd/sync/once.rsPaul Dicker-32/+29
2019-11-05Don't mutate node.nextPaul Dicker-36/+34
2019-10-25Mention park guaranteePaul Dicker-0/+4
2019-10-24Always align Waiter to 4 bytesPaul Dicker-0/+1
2019-10-24Use more precise atomic orderingsPaul Dicker-12/+41
2019-10-24In Waiter use interior mutability for threadPaul Dicker-9/+19
2019-10-24Reduce the amount of comments in call_innerPaul Dicker-19/+6
2019-10-24Move thread parking to a seperate functionPaul Dicker-38/+42
2019-10-24Turn Finish into WaiterQueuePaul Dicker-23/+21
2019-10-23Don't mutate waiter nodesPaul Dicker-9/+9
2019-10-23Simplify loop conditions in RUNNING and add commentsPaul Dicker-17/+29
2019-10-23Rename state to state_and_queuePaul Dicker-28/+29
2019-10-16Don't recommend ONCE_INIT in std::sync::Onceboyned//Kampfkarren-3/+2
ONCE_INIT is deprecated, and so suggesting it as not only being on par with, but before `Once::new` is a bad idea.
2019-10-13Remove Error::cause impls equal to deafult implLinus Färnstrand-20/+0
2019-08-31Update sync condvar doc styleIvan Tham-2/+2
2019-08-14Handle cfg(bootstrap) throughoutMark Rousskov-1/+0
2019-07-25Auto merge of #62990 - Centril:rollup-k9n0hvs, r=Centrilbors-18/+18
Rollup of 15 pull requests Successful merges: - #60066 (Stabilize the type_name intrinsic in core::any) - #60938 (rustdoc: make #[doc(include)] relative to the containing file) - #61884 (Stablize Euclidean Modulo (feature euclidean_division)) - #61890 (Fix some sanity checks) - #62528 (Add joining slices of slices with a slice separator, not just a single item) - #62707 (Add tests for overlapping explicitly dropped locals in generators) - #62735 (Turn `#[global_allocator]` into a regular attribute macro) - #62822 (Improve some pointer-related documentation) - #62887 (Make the parser TokenStream more resilient after mismatched delimiter recovery) - #62921 (Add method disambiguation help for trait implementation) - #62930 (Add test for #51559) - #62942 (Use match ergonomics in Condvar documentation) - #62977 (Fix inconsistent highlight blocks.) - #62978 (Remove `cfg(bootstrap)` code for array implementations) - #62981 (Add note suggesting to borrow a String argument to find) Failed merges: - #62964 (clarify and unify some type test names) r? @ghost
2019-07-25Auto merge of #60340 - mgeier:cap-vs-capacity, r=alexcrichtonbors-7/+7
Rename .cap() methods to .capacity() As mentioned in #60316, there are a few `.cap()` methods, which seem out-of-place because such methods are called `.capacity()` in the rest of the code. This PR renames them to `.capacity()` but leaves `RawVec::cap()` in there for backwards compatibility. I didn't try to mark the old version as "deprecated", because I guess this would cause too much noise.
2019-07-24Use match ergonomics in Condvar documentationKevin W Matthews-18/+18
2019-07-19ONCE_INIT is deprecated-in-future only for bootstrapRalf Jung-1/+2
2019-07-19warn about deprecated-in-future in most of libstdRalf Jung-1/+1
2019-07-05Rollup merge of #62123 - jeremystucki:needless_lifetimes_std, r=alexcrichtonMazdak Farrokhzad-1/+1
Remove needless lifetimes (std) Split from #62039
2019-07-01Convert more usages overChris Gregory-1/+1
2019-07-01Remove needless lifetimesJeremy Stucki-1/+1
2019-06-12Deprecate ONCE_INITSteven Fackler-0/+6
Once::new() has been a stable const fn for a while now. Closes #61746
2019-05-20Rollup merge of #60511 - taiki-e:libstd-intra-doc, r=Dylan-DPCMazdak Farrokhzad-0/+4
Fix intra-doc link resolution failure on re-exporting libstd Currently, re-exporting libstd items as below will [occur a lot of failures](https://gist.github.com/taiki-e/e33e0e8631ef47f65a74a3b69f456366). ```rust pub use std::*; ``` Until the underlying issue (#56922) fixed, we can fix that so they don't propagate to downstream crates. Related: https://github.com/rust-lang/rust/pull/56941 (That PR fixed failures that occur when re-exporting from libcore to libstd.) r? @QuietMisdreavus
2019-05-17Remove the unstable and deprecated mpsc_selectJosh Stone-1038/+9
This removes macro `select!` and `std::sync::mpsc::{Handle, Select}`, which were all unstable and have been deprecated since 1.32.
2019-05-04Fix intra-doc link resolution failure on re-exporting libstdTaiki Endo-0/+4
2019-04-27Rename .cap() methods to .capacity()Matthias Geier-7/+7
... but leave the old names in there for backwards compatibility.
2019-04-25ignore-tidy-filelength on all files with greater than 3000 linesvarkor-0/+2
2019-04-08Add must_use annotations to Result::is_ok and is_errAlex Gaynor-1/+1
2019-03-31libstd: deny(elided_lifetimes_in_paths)Mazdak Farrokhzad-39/+43