about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
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]
2014-09-24implement entry API for HashMapAlexis Beingessner-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, although this still needs to be done on the rest of the maps, they don't have any internal mutation methods defined, so they can be done without deprecating or breaking anything. Work on `BTree`'s 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]
2014-09-24Fix free lifetime vars in HashMap's iteratorsPiotr Czarnecki-5/+15
2014-09-24auto merge of #17477 : vhbit/rust/ios-deprecation-fix, r=alexcrichtonbors-5/+4
2014-09-23Deprecate `#[ignore(cfg(...))]`Steven Fackler-7/+6
Replace `#[ignore(cfg(a, b))]` with `#[cfg_attr(all(a, b), ignore)]`
2014-09-23Deal with the fallout of string stabilizationAlex Crichton-10/+10
2014-09-23Fixed: iOS build was broken because of deprecated APIsValerii Hiora-5/+4
2014-09-22auto merge of #17425 : klutzy/rust/win-backtrace, r=alexcrichtonbors-3/+5
Fixes #17372
2014-09-22auto merge of #17339 : treeman/rust/doc-things, r=alexcrichtonbors-6/+6
Also some cleanup to conform to documentation style.
2014-09-21Fix fallout from Vec stabilizationAlex Crichton-38/+45
2014-09-21Remove #[allow(deprecated)] from libstdAlex Crichton-53/+59
2014-09-22std::rt::backtrace: Fix symbol names on Windowsklutzy-3/+5
Fixes #17372
2014-09-21rename to conform to style guideville-h-1/+1
2014-09-20auto merge of #17404 : alexcrichton/rust/bitflags-u32, r=sfacklerbors-1/+7
If you didn't have a trailing comma at the end of the variants, you could use any type you wanted, but if you used a trailing comma the macro would erroneously require the bits be a u32.
2014-09-19std: Don't require bitflags! be u32Alex Crichton-1/+7
If you didn't have a trailing comma at the end of the variants, you could use any type you wanted, but if you used a trailing comma the macro would erroneously require the bits be a u32.
2014-09-19rollup merge of #17370 : klutzy/win64-backtraceAlex Crichton-0/+4
2014-09-19Add enum variants to the type namespaceNick Cameron-2/+2
Change to resolve and update compiler and libs for uses. [breaking-change] Enum variants are now in both the value and type namespaces. This means that if you have a variant with the same name as a type in scope in a module, you will get a name clash and thus an error. The solution is to either rename the type or the variant.
2014-09-18auto merge of #17249 : vadimcn/rust/env-keys, r=alexcrichtonbors-7/+76
Closes #16937
2014-09-18std::rt::backtrace: Fix backtrace on Win64klutzy-0/+4
`struct CONTEXT` and its substructs require 16-byte alignment.
2014-09-18auto merge of #17349 : aturon/rust/rt-experimental, r=alexcrichtonbors-1/+0
The `std::rt` module was marked `unstable` [a while back](https://github.com/rust-lang/rust/commit/b6d4d117f4c2770649c7ddc2ad9ad4ce4c3b13b1), and this change was not reverted when we moved to an `experimental` baseline for `std`.
2014-09-17Pacify lint gods.Vadim Chugunov-2/+3
2014-09-17Remove unstable marker from std::rtAaron Turon-1/+0
The `std::rt` module was marked `unstable` [a while back](https://github.com/rust-lang/rust/commit/b6d4d117f4c2770649c7ddc2ad9ad4ce4c3b13b1), and this change was not reverted when we moved to an `experimental` baseline for `std`.
2014-09-17rollup merge of #17326 : brson/wintestAlex Crichton-2/+2
2014-09-17rollup merge of #17297 : treeman/net-unixAlex Crichton-5/+4
2014-09-17auto merge of #17254 : gamazeps/rust/issue17210, r=alexcrichtonbors-0/+1
Closes #17210
2014-09-17doc: Cleanup.Jonas Hietala-6/+6
Remove ~~~ for code block specification. Use /// Over /** */ for doc blocks.
2014-09-17Case-insensitive environment keys.Vadim Chugunov-7/+75