about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2014-10-07auto merge of #17802 : Gankro/rust/collection-docs-redux, r=aturonbors-3/+317
Adds a high-level discussion of "what collection should you use for what", as well as some general discussion of correct/efficient usage of the capacity, iterator, and entry APIs. Still building docs to confirm this renders right and the examples are good, but the content can be reviewed now.
2014-10-06library-level docs for collectionsAlexis Beingessner-3/+317
2014-10-07Rename slicing methodsNick Cameron-0/+1
2014-10-07Rename slice::SliceNick Cameron-13/+13
2014-10-07Put slicing syntax behind a feature gate.Nick Cameron-16/+20
[breaking-change] If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.
2014-10-07Use slice syntax instead of slice_to, etc.Nick Cameron-71/+60
2014-10-06auto merge of #17814 : vhbit/rust/ios-build-fix, r=huonwbors-0/+1
2014-10-06Fixed iOS build (statics name lint)Valerii Hiora-0/+1
2014-10-06Remove the #[allow(non_uppercase_statics)] attr from bitflags!P1start-23/+18
2014-10-06Rename the file permission statics in std::io to be uppercaseP1start-60/+118
For example, this renames `GroupRWX` to `GROUP_RWX`, and deprecates the old name. Code using these statics should be updated accordingly.
2014-10-04Fix infinite recursion in Writer impl for &mut WriterBrian Koropoff-2/+2
Closes issue #17767
2014-10-03rollup merge of #17739 : eddyb/fix-process-testAlex Crichton-26/+0
2014-10-03rollup merge of #17387 : sneves/masterAlex Crichton-1/+1
2014-10-03Fix a race condition between remove_from_env and other io::process tests.Eduard Burtescu-26/+0
2014-10-03Set the `non_uppercase_statics` lint to warn by defaultP1start-4/+15
2014-10-02rollup merge of #17666 : eddyb/take-garbage-outAlex Crichton-161/+1
Conflicts: src/libcollections/lib.rs src/libcore/lib.rs src/librustdoc/lib.rs src/librustrt/lib.rs src/libserialize/lib.rs src/libstd/lib.rs src/test/run-pass/issue-8898.rs
2014-10-02rollup merge of #17686 : lucidd/fixAlex Crichton-2/+3
2014-10-02rollup merge of #17719 : alexcrichton/diagnoseAlex Crichton-1/+3
2014-10-02std: Help diagnose a flaky testAlex Crichton-1/+3
This test has recently been failing on the bots, and I'm not entirely sure why. I haven't been able to reproduce locally or on the bots, so I'm adding some messages to help diagnose the problem hopefully.
2014-10-02Revert "Use slice syntax instead of slice_to, etc."Aaron Turon-58/+69
This reverts commit 40b9f5ded50ac4ce8c9323921ec556ad611af6b7.
2014-10-02Revert "Put slicing syntax behind a feature gate."Aaron Turon-20/+16
This reverts commit 95cfc35607ccf5f02f02de56a35a9ef50fa23a82.
2014-10-02Revert "Review and rebasing changes"Aaron Turon-2/+2
This reverts commit 6e0611a48707a1f5d90aee32a02b2b15957ef25b.
2014-10-02syntax: mark the managed_boxes feature as Removed.Eduard Burtescu-1/+1
2014-10-02std: remove gc module.Eduard Burtescu-160/+0
2014-10-02Review and rebasing changesNick Cameron-2/+2
2014-10-02Put slicing syntax behind a feature gate.Nick Cameron-16/+20
[breaking-change] If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.
2014-10-02Use slice syntax instead of slice_to, etc.Nick Cameron-69/+58
2014-10-01Remove std::io::signalAaron Turon-238/+1
The `std::io::signal` API was only implemented under `librustuv`, which is now being removed. Rather than keep around an unimplemented API, this commit removes it altogether. See the [runtime removal RFC](https://github.com/rust-lang/rfcs/pull/230) for more context. See [green-rs](https://github.com/alexcrichton/green-rs/) for a possible migration path for signal handling code, although in the long run we plan to add native signal handling to `std::io`. [breaking-change]
2014-10-01Remove iotest macroAaron Turon-415/+599
This commit removes the `iotest!` macro from `std::io`. The macro was primarily used to ensure that all io-related tests were run on both libnative and libgreen/librustuv. However, now that the librustuv stack is being removed, the macro is no longer needed. See the [runtime removal RFC](https://github.com/rust-lang/rfcs/pull/230) for more context. [breaking-change]
2014-10-01Remove all use of librustuvAaron Turon-11/+0
2014-10-01auto merge of #17667 : wizeman/rust/fix-override-env, r=alexcrichtonbors-1/+16
In some build environments (such as chrooted Nix builds), `env` can only be found in the explicitly-provided PATH, not in default places such as /bin or /usr/bin. So we need to pass-through PATH when spawning the `env` sub-process. Fixes #17617
2014-10-01Fix async assertion in test_sendable_futureKevin Walter-2/+3
2014-10-01auto merge of #17630 : sfackler/rust/cfg-warnings, r=brsonbors-56/+52
Closes #17490
2014-10-01libstd: Pass-through PATH in test_override_envRicardo M. Correia-1/+16
In some build environments (such as chrooted Nix builds), `env` can only be found in the explicitly-provided PATH, not in default places such as /bin or /usr/bin. So we need to pass-through PATH when spawning the `env` sub-process. Fixes #17617
2014-09-30Fix libstdSteven Fackler-56/+52
2014-09-30librustc: Forbid `..` in range patterns.Patrick Walton-2/+2
This breaks code that looks like: match foo { 1..3 => { ... } } Instead, write: match foo { 1...3 => { ... } } Closes #17295. [breaking-change]
2014-09-30auto merge of #17563 : brson/rust/wintcbfix, r=thestingerbors-39/+1
This is the bare minimum to stop using split stacks on Windows, fixing https://github.com/rust-lang/rust/issues/13259 and #14742, by turning on stack probes for all functions and disabling compiler and runtime support for split stacks on Windows. It does not restore the out-of-stack error message, which requires more runtime work. This includes a test that the Windows TCB is no longer being clobbered, but the out-of-stack test itself is pretty weak, only testing that the program exits abnormally, not that it isn't writing to bogus memory, so I haven't truly verified that this is providing the safety we claim. A more complete solution is in https://github.com/rust-lang/rust/pull/16388, which has some unresolved issues yet. cc @Zoxc @klutzy @vadimcn
2014-09-30Include ChaCha pseudorandom generatorSamuel Neves-1/+1
2014-09-29rollup merge of #17582 : kmcallister/gc-boxAlex Crichton-1/+1
2014-09-29rollup merge of #17548 : cgaebel/masterAlex Crichton-6/+26
2014-09-27auto merge of #17517 : pczarn/rust/hashmap-lifetimes, r=alexcrichtonbors-5/+15
Fixes #17500
2014-09-27auto merge of #17334 : Gankro/rust/btree-vec, r=huonwbors-1/+1
Replaces BTree with BTreeMap and BTreeSet, which are completely new implementations. BTreeMap's internal Node representation is particularly inefficient at the moment to make this first implementation easy to reason about and fairly safe. Both collections are also currently missing some of the tooling specific to sorted collections, which is planned as future work pending reform of these APIs. General implementation issues are discussed with TODOs internally [breaking-change] Still waiting on compilation/test/bench stuff locally, but the edit-distance on any errors should be very small at this point. This is ready to be reviewed.
2014-09-27complete btree rewriteAlexis Beingessner-1/+1
Replaces BTree with BTreeMap and BTreeSet, which are completely new implementations. BTreeMap's internal Node representation is particularly inefficient at the moment to make this first implementation easy to reason about and fairly safe. Both collections are also currently missing some of the tooling specific to sorted collections, which is planned as future work pending reform of these APIs. General implementation issues are discussed with TODOs internally Perf results on x86_64 Linux: test treemap::bench::find_rand_100 ... bench: 76 ns/iter (+/- 4) test treemap::bench::find_rand_10_000 ... bench: 163 ns/iter (+/- 6) test treemap::bench::find_seq_100 ... bench: 77 ns/iter (+/- 3) test treemap::bench::find_seq_10_000 ... bench: 115 ns/iter (+/- 1) test treemap::bench::insert_rand_100 ... bench: 111 ns/iter (+/- 1) test treemap::bench::insert_rand_10_000 ... bench: 996 ns/iter (+/- 18) test treemap::bench::insert_seq_100 ... bench: 486 ns/iter (+/- 20) test treemap::bench::insert_seq_10_000 ... bench: 800 ns/iter (+/- 15) test btree::map::bench::find_rand_100 ... bench: 74 ns/iter (+/- 4) test btree::map::bench::find_rand_10_000 ... bench: 153 ns/iter (+/- 5) test btree::map::bench::find_seq_100 ... bench: 82 ns/iter (+/- 1) test btree::map::bench::find_seq_10_000 ... bench: 108 ns/iter (+/- 0) test btree::map::bench::insert_rand_100 ... bench: 220 ns/iter (+/- 1) test btree::map::bench::insert_rand_10_000 ... bench: 620 ns/iter (+/- 16) test btree::map::bench::insert_seq_100 ... bench: 411 ns/iter (+/- 12) test btree::map::bench::insert_seq_10_000 ... bench: 534 ns/iter (+/- 14) BTreeMap still has a lot of room for optimization, but it's already beating out TreeMap on most access patterns. [breaking-change]
2014-09-26Rename raw::Box to raw::GcBoxKeegan McAllister-1/+1
Fixes #17470.
2014-09-27auto merge of #17506 : sfackler/rust/cfg-attr, r=alexcrichtonbors-7/+6
cc #17490 Reopening of #16230
2014-09-26librustc: Give trait methods accessible via fewer autoderefs priorityPatrick Walton-4/+11
over inherent methods accessible via more autoderefs. This simplifies the trait matching algorithm. It breaks code like: impl Foo { fn foo(self) { // before this change, this will be called } } impl<'a,'b,'c> Trait for &'a &'b &'c Foo { fn foo(self) { // after this change, this will be called } } fn main() { let x = &(&(&Foo)); x.foo(); } To explicitly indicate that you wish to call the inherent method, perform explicit dereferences. For example: fn main() { let x = &(&(&Foo)); (***x).foo(); } Part of #17282. [breaking-change]
2014-09-26Disable runtime split stack support on WindowsBrian Anderson-39/+1
2014-09-25Ignore two I/O tests that are failing on the win32 botBrian Anderson-0/+2
2014-09-25Added bitflag toggling.Clark Gaebel-6/+26
2014-09-25auto merge of #17378 : Gankro/rust/hashmap-entry, r=aturonbors-6/+287
Deprecates the `find_or_*` family of "internal mutation" methods on `HashMap` in favour of the "external mutation" Entry API as part of RFC 60. Part of #17320, but this still needs to be done on the rest of the maps. However they don't have any internal mutation methods defined, so they can be done without deprecating or breaking anything. Work on `BTree` is part of the complete rewrite in #17334. The implemented API deviates from the API described in the RFC in two key places: * `VacantEntry.set` yields a mutable reference to the inserted element to avoid code duplication where complex logic needs to be done *regardless* of whether the entry was vacant or not. * `OccupiedEntry.into_mut` was added so that it is possible to return a reference into the map beyond the lifetime of the Entry itself, providing functional parity to `VacantEntry.set`. This allows the full find_or_insert functionality to be implemented using this API. A PR will be submitted to the RFC to amend this. [breaking-change]