about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2015-01-17auto merge of #21132 : sfackler/rust/wait_timeout, r=alexcrichtonbors-97/+343
**The implementation is a direct adaptation of libcxx's condition_variable implementation.** I also added a wait_timeout_with method, which matches the second overload in C++'s condition_variable. The implementation right now is kind of dumb but it works. There is an outstanding issue with it: as is it doesn't support the use case where a user doesn't care about poisoning and wants to continue through poison. r? @alexcrichton @aturon
2015-01-16Rewrite Condvar::wait_timeout and make it publicSteven Fackler-97/+343
**The implementation is a direct adaptation of libcxx's condition_variable implementation.** pthread_cond_timedwait uses the non-monotonic system clock. It's possible to change the clock to a monotonic via pthread_cond_attr, but this is incompatible with static initialization. To deal with this, we calculate the timeout using the system clock, and maintain a separate record of the start and end times with a monotonic clock to be used for calculation of the return value.
2015-01-16auto merge of #20972 : FlaPer87/rust/oibit-send-and-friends, r=nikomatsakisbors-0/+163
This PR adds rules for negative implementations. It follows pretty much what the [RFC](https://github.com/rust-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md) says with 1 main difference: Instead of positive implementations override negative implementations, this have been implemented in a way that a negative implementation of `Trait` for `T` will overlap with a positive implementation, causing a coherence error. @nikomatsakis r? cc #13231 [breaking-change]
2015-01-16Don't use NoSend/NoSync in libstdFlavio Percoco-0/+163
2015-01-16Merge pull request #21211 from fenhl/patch-1bors-1/+1
Fix std::sync::condvar::Condvar::notify_one docs Reviewed-by: alexcrichton
2015-01-15add a section on performance to collection docsAlexis-2/+52
2015-01-15Fix sync::condvar::Condvar::notify_one docsFenhl-1/+1
2015-01-15rollup merge of #21161: japaric/ufcs-hashAlex Crichton-0/+2
expansion now uses `::std::hash::Hash::hash(&*__self_0_0, __arg_0)` instead of `(*__self_0_0).hash(__arg_0)` closes #21160 r? @alexcrichton
2015-01-15rollup merge of #21059: steveklabnik/gh16072Alex Crichton-1/+26
Fixes #16072 r? @huonw
2015-01-15auto merge of #20980 : richo/rust/final-power, r=alexcrichtonbors-10/+46
Originally, this was going to be discussed and revisted, however I've been working on this for months, and a rebase on top of master was about 1 flight's worth of work so I just went ahead and did it. This gets you as far as being able to target powerpc with, eg: LD_LIBRARY_PATH=./x86_64-unknown-linux-gnu/stage2/lib/ x86_64-unknown-linux-gnu/stage2/bin/rustc -C linker=powerpc-linux-gnu-gcc --target powerpc-unknown-linux-gnu hello.rs Would really love to get this out before 1.0. r? @alexcrichton
2015-01-14use UFCS in `#[deriving(Hash)]`Jorge Aparicio-0/+2
expansion now uses `::std::hash::Hash::hash(&*__self_0_0, __arg_0)` instead of `(*__self_0_0).hash(__arg_0)` closes #21160
2015-01-14auto merge of #21076 : sfackler/rust/bufferedreader-undef, r=Gankrobors-11/+10
It's passed to the underlying reader, so uninitialized memory == sad times. We might want to shrink the default buffer size as well. 64k is pretty huge. Java uses 8k by default, and Go uses 4k for reference. r? @alexcrichton
2015-01-14auto merge of #21061 : japaric/rust/range, r=nick29581bors-44/+44
2015-01-13auto merge of #20367 : retep998/rust/master, r=alexcrichtonbors-83/+49
Also adjusted some of the FFI definitions because apparently they don't use the long pointer prefix. Gives a free performance boost because `SRWLock` is several times faster than `CriticalRegion` on every Windows system tested. Fixes #19962
2015-01-12Initialize memory for BufferedReader bufferSteven Fackler-11/+10
It's passed to the underlying reader, so uninitialized memory == sad times. We might want to shrink the default buffer size as well. 64k is pretty huge. Java uses 8k by default, and Go uses 4k for reference.
2015-01-12Change Mutex to use SRWLock on Windows.Peter Atashian-83/+49
Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-01-13auto merge of #20944 : brson/rust/weve-met-with-a-terrible-fate-havent-we, ↵bors-50/+0
r=brson Closes #13871
2015-01-12cleanup: `&foo[0..a]` -> `&foo[..a]`Jorge Aparicio-44/+44
2015-01-12Add note about TLS lookups in random()Steve Klabnik-1/+26
Fixes #16072
2015-01-12auto merge of #20896 : sfackler/rust/atomic-rename, r=alexcrichtonbors-59/+59
Change any use of AtomicInt to AtomicIsize and AtomicUint to AtomicUsize Closes #20893 [breaking-change]
2015-01-11powerpc: pthread supportRicho Healey-3/+6
2015-01-11powerpc: Fixup more stack workRicho Healey-0/+1
2015-01-11powerpc: add cdefs for linuxRicho Healey-3/+9
This borrowed entirely from the mips definitions, and should be revisited after it lands while testing.
2015-01-11powerpc: Janky segmented stack supportRicho Healey-0/+12
2015-01-11powerpc: Add unwinder size REVISITRicho Healey-0/+3
2015-01-11powerpc: Add libstd utilsRicho Healey-4/+15
2015-01-12Merge pull request #20920 from piyo/issue-20853bors-1/+13
Give mmap a page-aligned stack start address Reviewed-by: Aatch
2015-01-12Merge pull request #20915 from csouth3/hash-itersbors-30/+98
Add ExactSizeIterator impls for Hash{Map, Set, Table} Reviewed-by: Gankro
2015-01-12Merge pull request #20903 from XMPPwocky/deadlink1bors-1/+1
Fix dead link in documentation (s/task/thread/) Reviewed-by: Aatch
2015-01-11Rename AtomicInt and AtomicUintSteven Fackler-59/+59
Change any use of AtomicInt to AtomicIsize and AtomicUint to AtomicUsize Closes #20893 [breaking-change]
2015-01-11std: Remove fortune cookies from fatal runtime errorsBrian Anderson-50/+0
Closes #13871
2015-01-11Give mmap a page-aligned stack start addressClifford Caoile-1/+13
2015-01-10Add ExactSizeIterator impls for Hash{Map, Set, Table}Chase Southwood-30/+98
This commit also changes the return types of all `size_hint()` impls in these files from (uint, Option<uint>) to (usize, Option<usize>).
2015-01-10Implement Show for types in std::io::{buffered,util}Steven Fackler-10/+46
A derived implementation would not be appropriate for the Buffered types since the buffer is both huge (64k by default) and full of uninitialized memory. Instead of printing the whole thing, we display how full it is. I also altered MultiWriter to make it generic over Writers instead of taking Box<Writer> trait objects. Box<Writer> implements Writer so existing use cases should continue to work, and this enables a more useful Show implementation in applicable cases. The change to MultiWriter may break code that uses it, but any fixes should be easy. [breaking-change]
2015-01-11Fix dead link (s/task/thread/)Nathaniel Theis-1/+1
2015-01-09auto merge of #20776 : kmcallister/rust/macro-cleanup, r=alexcrichtonbors-179/+2
r? @alexcrichton. This passes tests for me.
2015-01-09Re-reduce libstd macro duplicationKeegan McAllister-179/+2
The libstd definitions move to libcore, which causes some minor updates there.
2015-01-09Merge pull request #20699 from vhbit/ios-archsbors-11/+27
Better iOS support Reviewed-by: alexcrichton
2015-01-09iOS: preliminary 64-bit archs supportValerii Hiora-3/+6
2015-01-09iOS: fixed test buildValerii Hiora-8/+21
Now it is possible to run tests on a jailbroken device
2015-01-09Merge pull request #20741 from mneumann/dragonfly-pthread-mutexbors-0/+37
Fix assertion in Mutex::destroy() on DragonFly (#20698) Reviewed-by: alexcrichton
2015-01-08Merge pull request #20735 from squidpickles/masterbors-1/+1
Spelling fix compatibel -> compatible Reviewed-by: Gankro
2015-01-08Fix destroy assertions in mutex/rwlock/condvarMichael Neumann-0/+37
On DragonFly pthread_{mutex,rwlock,condvar}_destroy() returns EINVAL when called on a pthread_{mutex,rwlock,condvar}_t that was just initialized via PTHREAD_{MUTEX,RWLOCK,CONDVAR}_INITIALIZER and not used in the meantime or initialized via pthread_{mutex,rwlock,condvar}_init(). Change the code to treat a return value of EINVAL on DragonFly as success.
2015-01-08rollup merge of #20754: nikomatsakis/int-featureAlex Crichton-4/+5
Conflicts: src/test/compile-fail/borrowck-move-out-of-overloaded-auto-deref.rs src/test/compile-fail/issue-2590.rs src/test/compile-fail/lint-stability.rs src/test/compile-fail/slice-mut-2.rs src/test/compile-fail/std-uncopyable-atomics.rs
2015-01-08Remove warning from the libraries.Huon Wilson-4/+5
This adds the int_uint feature to *every* library, whether or not it needs it.
2015-01-08Improvements to feature stagingBrian Anderson-80/+80
This gets rid of the 'experimental' level, removes the non-staged_api case (i.e. stability levels for out-of-tree crates), and lets the staged_api attributes use 'unstable' and 'deprecated' lints. This makes the transition period to the full feature staging design a bit nicer.
2015-01-07Spelling fix compatibel -> compatibleKevin Rauwolf-1/+1
2015-01-07More test fixes and rebase conflictsAlex Crichton-1/+1
2015-01-07Test fixes and rebase conflictsAlex Crichton-4/+4
2015-01-07rollup merge of #20723: pnkfelix/feature-gate-box-syntaxAlex Crichton-0/+1
Conflicts: src/compiletest/compiletest.rs src/libcollections/lib.rs src/libserialize/lib.rs src/libsyntax/feature_gate.rs