about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2015-01-20Kill RacyCell in favor of marking SyncSender explicitly Send.JP Sugarbroad-34/+17
2015-01-21Rollup merge of #21387 - retep998:hmodule, r=alexcrichtonBarosl LEE-1/+1
r? @alexcrichton
2015-01-21Rollup merge of #21375 - petrochenkov:ssbsl, r=alexcrichtonBarosl LEE-15/+12
After PR #19766 added implicit coersions `*mut T -> *const T`, the explicit casts can be removed. (The number of such casts turned out to be relatively small).
2015-01-21Rollup merge of #21359 - WiSaGaN:bugfix/fix_marker, r=alexcrichtonBarosl LEE-1/+1
From std::markers to std::marker.
2015-01-21Rollup merge of #21331 - michaelsproul:sync-error-impls, r=alexcrichtonBarosl LEE-6/+23
Two errors in `std::sync` are currently missing implementations of the standard error trait because they contain types which aren't `Send`. This PR therefore requires #21312.
2015-01-21Rollup merge of #21312 - michaelsproul:remove-error-send-bound, r=aturonBarosl LEE-8/+8
As discussed with @aturon, this PR removes the `Send` bound from `std::error::Error`, allowing us to implement `Error` for error types containing non-`Send` types. Current examples include `PoisonError` and `TryLockError` from `std::sync` which contain a Guard that we don't want sent between tasks. [breaking-change]
2015-01-21Rollup merge of #21302 - gutworth:rm-find-equiv-test, r=brsonBarosl LEE-17/+0
2015-01-21Rollup merge of #20998 - estsauver:20984, r=steveklabnikBarosl LEE-1/+1
There are a large number of places that incorrectly refer to deriving in comments, instead of derives. If someone could look at src/etc/generate-deriving-span-tests.py, I'm not sure how those tests were passing before/if they were.
2015-01-20prettier Buffer::read_untilOliver Schneider-10/+8
2015-01-20Correct small typos in map.rs.Toby Scrace-23/+23
This just corrects a couple of typos in doc comments, and changes some to conform to the Rust guidelines.
2015-01-20Initial support for aarch64-linux-androidEunji Jeong-2/+2
2015-01-19Auto merge of #20082 - pczarn:btree-bounded-iter, r=Gankrobors-0/+1
Part of collections reform v1, #18424 Also, iteration is simplified: ``` before test btree::map::bench::iter_1000 ... bench: 17177 ns/iter (+/- 6302) test btree::map::bench::iter_100000 ... bench: 1735731 ns/iter (+/- 23908) test btree::map::bench::iter_20 ... bench: 386 ns/iter (+/- 148) after test btree::map::bench::iter_1000 ... bench: 15777 ns/iter (+/- 346) test btree::map::bench::iter_100000 ... bench: 1602604 ns/iter (+/- 73629) test btree::map::bench::iter_20 ... bench: 339 ns/iter (+/- 91) ``` cc @gereeter @cgaebel r? @Gankro
2015-01-19remove unnecessary parentheses from range notationJorge Aparicio-19/+19
2015-01-19Fix flaky condvar testSteven Fackler-4/+5
2015-01-19Implement range and range_mut for BTreePiotr Czarnecki-0/+1
Simplify BTree's iterators, too.
2015-01-19Impl Send for Timer on WindowsPeter Atashian-1/+7
Fixes #20943 Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-01-19Fix HMODULEPeter Atashian-1/+1
Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-01-19Replace `0 as *const/mut T` with `ptr::null/null_mut()`we-35/+43
2015-01-19std::dynamic_lib: Fix Windows error handlingklutzy-43/+105
This is a [breaking-change] since `std::dynamic_lib::dl` is now private. When `LoadLibraryW()` fails, original code called `errno()` to get error code. However, there was local allocation of `Vec` before `LoadLibraryW()`, and it drops before `errno()`, and the drop (deallocation) changed `errno`! Therefore `dynamic_lib::open()` thought it always succeeded. This commit fixes the issue. This commit also sets Windows error mode during `LoadLibrary()` to prevent "dll load failed" dialog.
2015-01-18Fix std::marker.Wangshan Lu-1/+1
From std::markers to std::marker.
2015-01-17Set allow(unstable) in crates that use unstable featuresBrian Anderson-0/+2
Lets them build with the -dev, -nightly, or snapshot compiler
2015-01-17Register new snapshots.Eduard Burtescu-38/+22
2015-01-17Implement the error trait for errors in std::sync.Michael Sproul-6/+23
2015-01-17Refine wording of Thread::panickingSimonas Kazlauskas-2/+2
Previous wording wasn’t clear about its actual behaviour. It could be interpreted as answering either: * Can current thread panic? * Is current thread unwinding because of panic?
2015-01-17Remove Send bound from Error trait.Michael Sproul-8/+8
2015-01-17s/deriving/derives in Comments/DocsEarl St Sauver-1/+1
There are a large number of places that incorrectly refer to deriving in comments, instead of derives. Fixes #20984
2015-01-17fix rollupSteve Klabnik-0/+2
2015-01-17remove test_find_equiv, since find_equiv doesn't exist anymoreBenjamin Peterson-17/+0
2015-01-17std: Move the bitflags! macro to a gated crateAlex Crichton-479/+3
In accordance with [collections reform part 2][rfc] this macro has been moved to an external [bitflags crate][crate] which is [available though crates.io][cratesio]. Inside the standard distribution the macro has been moved to a crate called `rustc_bitflags` for current users to continue using. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0509-collections-reform-part-2.md [crate]: https://github.com/rust-lang/bitflags [cratesio]: http://crates.io/crates/bitflags The major user of `bitflags!` in terms of a public-facing possibly-stable API today is the `FilePermissions` structure inside of `std::io`. This user, however, will likely no longer use `bitflags!` after I/O reform has landed. To prevent breaking APIs today, this structure remains as-is. Current users of the `bitflags!` macro should add this to their `Cargo.toml`: bitflags = "0.1" and this to their crate root: #[macro_use] extern crate bitflags; Due to the removal of a public macro, this is a: [breaking-change]
2015-01-17Evaluate # fn in docsSteve Klabnik-50/+36
I searched for times when we were hiding functions with # in the documentation, and fixed them to not use it unless neccesary. I also made random improvements whenever I changed something. For example, I changed Example to Examples, for consistency. Fixes #13423
2015-01-17Remove unnecessary explicit conversions to *const Twe-15/+12
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