about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2015-01-21More test fixes and rebase conflictsAlex Crichton-1/+1
2015-01-21rollup merge of #21258: aturon/stab-3-indexAlex Crichton-29/+29
Conflicts: src/libcore/ops.rs src/librustc_typeck/astconv.rs src/libstd/io/mem.rs src/libsyntax/parse/lexer/mod.rs
2015-01-21Test fixes and rebase conflictsAlex Crichton-3/+4
2015-01-21rollup merge of #21457: alexcrichton/issue-21436Alex Crichton-266/+127
Conflicts: src/liballoc/boxed.rs src/librustc/middle/traits/error_reporting.rs src/libstd/sync/mpsc/mod.rs
2015-01-21rollup merge of #21444: petrochenkov/nullAlex Crichton-34/+41
Conflicts: src/libstd/sync/mpsc/select.rs
2015-01-21rollup merge of #21438: taralx/kill-racycellAlex Crichton-33/+15
Conflicts: src/libstd/sync/mpsc/mod.rs
2015-01-21rollup merge of #21437: FlaPer87/snapshotAlex Crichton-161/+0
r? @alexcrichton
2015-01-21rollup merge of #21423: oli-obk/prettier_read_untilAlex Crichton-10/+8
Conflicts: src/libstd/io/mod.rs
2015-01-21rollup merge of #21419: Toby-S/patch-1Alex Crichton-23/+23
This just corrects a couple of typos in doc comments, and changes some to conform to the Rust guidelines.
2015-01-21rollup merge of #21414: ejjeong/aarch64-linux-androidAlex Crichton-2/+2
Initial support for aarch64-linux-android (#18920) - Add new configuration files - Modify some options to compile & link succesfully. (PIE, disable tls on jemalloc, modify some external function linkage, ..) - To build, refer to https://github.com/rust-lang/rust/wiki/Doc-building-for-android. (tested with platform=21 and toolchain=aarch64-linux-android-4.9)
2015-01-21rollup merge of #21396: japaric/no-parens-in-rangeAlex Crichton-19/+19
Conflicts: src/libsyntax/parse/lexer/comments.rs
2015-01-21rollup merge of #21389: retep998/timerAlex Crichton-1/+7
Fixes #20943 and adds a test for it r? @alexcrichton
2015-01-21Fallout from stabilization.Aaron Turon-29/+29
2015-01-20std: Rename Show/String to Debug/DisplayAlex Crichton-266/+127
This commit is an implementation of [RFC 565][rfc] which is a stabilization of the `std::fmt` module and the implementations of various formatting traits. Specifically, the following changes were performed: [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0565-show-string-guidelines.md * The `Show` trait is now deprecated, it was renamed to `Debug` * The `String` trait is now deprecated, it was renamed to `Display` * Many `Debug` and `Display` implementations were audited in accordance with the RFC and audited implementations now have the `#[stable]` attribute * Integers and floats no longer print a suffix * Smart pointers no longer print details that they are a smart pointer * Paths with `Debug` are now quoted and escape characters * The `unwrap` methods on `Result` now require `Display` instead of `Debug` * The `Error` trait no longer has a `detail` method and now requires that `Display` must be implemented. With the loss of `String`, this has moved into libcore. * `impl<E: Error> FromError<E> for Box<Error>` now exists * `derive(Show)` has been renamed to `derive(Debug)`. This is not currently warned about due to warnings being emitted on stage1+ While backwards compatibility is attempted to be maintained with a blanket implementation of `Display` for the old `String` trait (and the same for `Show`/`Debug`) this is still a breaking change due to primitives no longer implementing `String` as well as modifications such as `unwrap` and the `Error` trait. Most code is fairly straightforward to update with a rename or tweaks of method calls. [breaking-change] Closes #21436
2015-01-21Auto merge of #21395 - sfackler:fix-cvar-test, r=alexcrichtonbors-4/+5
r? @alexcrichton
2015-01-20Register snapshot for 9006c3cFlavio Percoco-161/+0
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-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