about summary refs log tree commit diff
path: root/src/libstd/sync
AgeCommit message (Collapse)AuthorLines
2017-06-02Rewrite `Receiver::try_iter` doc example to show resulting values.Corey Farwell-8/+13
2017-06-02Rewrite `Receiver::iter` doc example to show resulting values.Corey Farwell-6/+8
2017-06-01Auto merge of #42281 - eddyb:well-adjusted, r=nikomatsakisbors-10/+10
Decompose Adjustment into smaller steps and remove the method map. The method map held method callee information for: * actual method calls (`x.f(...)`) * overloaded unary, binary, indexing and call operators * *every overloaded deref adjustment* (many can exist for each expression) That last one was a historical ~~accident~~ hack, and part of the motivation for this PR, along with: * a desire to compose adjustments more freely * containing the autoderef logic better to avoid mutation within an inference snapshot * not creating `TyFnDef` types which are incompatible with the original one * i.e. we used to take a`TyFnDef`'s `for<'a> &'a T -> &'a U` signature and instantiate `'a` using a region inference variable, *then* package the resulting `&'b T -> &'b U` signature in another `TyFnDef`, while keeping *the same* `DefId` and `Substs` * to fix #3548 by explicitly writing autorefs for the RHS of comparison operators Individual commits tell their own story, of "atomic" changes avoiding breaking semantics. Future work based on this PR could include: * removing the signature from `TyFnDef`, now that it's always "canonical" * some questions of variance remain, as subtyping *still* treats the signature differently * moving part of the typeck logic for methods, autoderef and coercion into `rustc::traits` * allowing LUB coercions (joining multiple expressions) to "stack up" many adjustments * transitive coercions (e.g. reify or unsize after multiple steps of autoderef) r? @nikomatsakis
2017-06-01tests: fix fallout from empowering unused_allocation in comparisons.Eduard-Mihai Burtescu-10/+10
2017-05-31Rewrite doc examples for `Receiver::recv_timeout`.Corey Farwell-4/+33
2017-05-22libstd/sync/mpsc: relicense under rust licenseDmitry Vyukov-54/+20
These files are licensed under a different license than the rest of the codebase. This causes potential issues and inconveniences. Relicense these files under the standard license. I hold original copyright on that code. Fixes #36556
2017-05-20Auto merge of #42111 - ollie27:stab, r=Mark-Simulacrumbors-9/+9
Correct some stability versions These were found by running tidy on stable versions of rust and finding features stabilised with the wrong version numbers.
2017-05-20Correct some stability versionsOliver Middleton-9/+9
These were found by running tidy on stable versions of rust and finding features stabilised with the wrong version numbers.
2017-05-18fix typo in libstd/sync/mpsc/mod.rs docsDenis Andrejew-1/+1
2017-04-29need to pick a new feature nameRalf Jung-1/+1
2017-04-29MutexGuard<T> may be Sync only if T is SyncRalf Jung-5/+3
Also remove some unnecessary unsafe impl from the tests.
2017-04-26Adding links and examples for various mspc pages #29377projektir-29/+254
2017-04-22Fix invalid linkageGuillaume Gomez-1/+1
2017-04-10Auto merge of #41103 - projektir:channel_error_docs, r=GuillaumeGomezbors-50/+84
Channel error docs r? @steveklabnik I'm going to need some help on this one, a few ambiguities.
2017-04-09Minor fix to mutex exampleGeoffry Song-1/+1
Presumably `N` was supposed to be used in both places.
2017-04-08Adding links around Sender/SyncSender/Receiver errors; Adding more ↵projektir-50/+84
documentation to channel() and sync_channel(); adding more links #29377
2017-04-05Rollup merge of #40981 - Technius:master, r=steveklabnikCorey Farwell-46/+172
Add links and some examples to std::sync::mpsc docs Addresses part of #29377 r? @steveklabnik I took a stab at adding links to the `std::sync::mpsc` docs, and I also wrote a few examples. Edit: Whoops, typed in `?r` instead of `r?`.
2017-04-05Rollup merge of #40977 - projektir:BarrierWaitResult_doc, r=steveklabnikCorey Farwell-5/+4
Updating the description for BarrierWaitResult #29377 Referencing `Barrier`, removing reference to `is_leader`.
2017-04-05Rollup merge of #40608 - GuillaumeGomez:mutex-doc-inconsistency, r=steveklabnikCorey Farwell-7/+7
Fix mutex's docs inconsistency Fixes #40176. r? @steveklabnik cc @rust-lang/docs
2017-04-03Fix styling issuesBryan Tan-6/+17
2017-04-03Fix mutex's docs inconsistencyGuillaume Gomez-7/+7
2017-03-31Fix warnings in examplesBryan Tan-9/+9
2017-03-31Fix broken links to std::iter::Iterator::nextBryan Tan-2/+2
2017-03-31Add links and examples to std::sync::mpsc docs (#29377)Bryan Tan-31/+136
This change adds links to to `Receiver`, `Iter`, `TryIter`, `IntoIter`, `Sender`, `SyncSender`, `SendError`, `RecvError`, `TryRecvError`, `RecvTimeoutError`, `TrySendError`, `Sender::send`, `SyncSender::send`, `SyncSender::try_send`, `Receiver::recv`, `Receiver::recv_timeout`, `Receiver::iter`, and `Receiver::try_iter`. Examples added to `Receiver`, `Sender`, `Receiver::iter`.
2017-03-31Updating the description for BarrierWaitResult #29377projektir-5/+4
2017-03-30Add links to std::sync::mpsc docs #29377Bryan Tan-15/+25
2017-03-29Adding linking for Once docs #29377projektir-8/+29
2017-03-19Rollup merge of #40611 - ScottAbbey:patch-1, r=GuillaumeGomezCorey Farwell-1/+1
Fix typo in mutex.rs docs This seems to match other uses of "be accessed" in the document.
2017-03-17Fix typo in mutex.rs docsScottAbbey-1/+1
This seems to match other uses of "be accessed" in the document.
2017-03-13Remove function invokation parens from documentation links.Corey Farwell-26/+26
This was never established as a convention we should follow in the 'More API Documentation Conventions' RFC: https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md
2017-02-28Rollup merge of #40033 - GuillaumeGomez:condvar-docs, r=frewsxcvCorey Farwell-16/+230
Add missing urls and examples for Condvar docs r? @frewsxcv
2017-02-24Rollup merge of #40052 - GuillaumeGomez:sunc_docs, r=frewsxcvGuillaume Gomez-1/+3
Add missing urls in MutexGuard docs r? @frewsxcv
2017-02-23Add missing urls in MutexGuard docsGuillaume Gomez-1/+3
2017-02-23Add missing urls and examples for Condvar docsGuillaume Gomez-16/+230
2017-02-21Add missing urls and examples into Barrier structsGuillaume Gomez-7/+69
2017-02-15Fix wording in LocalKey documentationStjepan Glavina-1/+1
2017-02-05Rollup merge of #39393 - ollie27:stab_impls, r=alexcrichtonCorey Farwell-7/+7
Fix a few impl stability attributes The versions show up in rustdoc.
2017-02-04tiny doc wording changeSon-1/+1
2017-01-29Fix a few impl stability attributesOliver Middleton-7/+7
The versions show up in rustdoc.
2017-01-10Add missing doc examples for MutexGuillaume Gomez-1/+79
2016-12-28Replace uses of `#[unsafe_destructor_blind_to_params]` with `#[may_dangle]`Andrew Paseltiner-4/+2
CC #34761
2016-12-20Rollup merge of #38006 - frewsxcv:libstd-debug, r=alexcrichtonAlex Crichton-0/+64
Implement `fmt::Debug` for all structures in libstd. Part of https://github.com/rust-lang/rust/issues/31869. Also turn on the `missing_debug_implementations` lint at the crate level.
2016-12-19Rollup merge of #38421 - apasel422:issue-36934, r=alexcrichtonSeo Sanghyeon-328/+328
Replace invalid use of `&mut` with `UnsafeCell` in `std::sync::mpsc` Closes #36934 r? @alexcrichton
2016-12-18Implement `fmt::Debug` for all structures in libstd.Corey Farwell-0/+64
Part of https://github.com/rust-lang/rust/issues/31869. Also turn on the `missing_debug_implementations` lint at the crate level.
2016-12-16Replace invalid use of `&mut` with `UnsafeCell` in `std::sync::mpsc`Andrew Paseltiner-328/+328
Closes #36934
2016-12-15Stabilize std::sync::mpsc::Receiver::try_iterAaron Turon-3/+3
2016-12-07Improve and fix mpsc documentationCobrand-9/+20
Closes #37915 This commit enhances documentation with several links and fixes an error in the `sync_channel` documentation as well: `send` doesn't panic when the senders are all disconnected
2016-11-26Rollup merge of #38010 - frewsxcv:lock-creations, r=GuillaumeGomezSeo Sanghyeon-1/+22
Document how lock 'guard' structures are created.
2016-11-25Document how the `MutexGuard` structure is created.Corey Farwell-1/+8
Also, end sentence with a period.
2016-11-25Document how the `RwLockWriteGuard` structure is created.Corey Farwell-0/+7