summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
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
2014-09-16Fallout from renamingAaron Turon-69/+75
2014-09-16Use PATH instead of HOME in env! exampleBrian Anderson-2/+2
HOME does not exist under typical windows environments.
2014-09-16Align with _mut conventionsAaron Turon-5/+17
As per [RFC 52](https://github.com/rust-lang/rfcs/blob/master/active/0052-ownership-variants.md), use `_mut` suffixes to mark mutable variants, and `into_iter` for moving iterators. [breaking-change]
2014-09-16Rename std::io::net::unix to std::io::net::pipe.Jonas Hietala-5/+4
Renamed as we may support pipes for other platforms. Closes #12093 [breaking-change]
2014-09-14inlines contains in bitflags!Felix Raimundo-0/+1
Closes #17210
2014-09-13librustc: Forbid inherent implementations that aren't adjacent to thePatrick Walton-14/+28
type they provide an implementation for. This breaks code like: mod foo { struct Foo { ... } } impl foo::Foo { ... } Change this code to: mod foo { struct Foo { ... } impl Foo { ... } } Additionally, if you used the I/O path extension methods `stat`, `lstat`, `exists`, `is_file`, or `is_dir`, note that these methods have been moved to the the `std::io::fs::PathExtensions` trait. This breaks code like: fn is_it_there() -> bool { Path::new("/foo/bar/baz").exists() } Change this code to: use std::io::fs::PathExtensions; fn is_it_there() -> bool { Path::new("/foo/bar/baz").exists() } Closes #17059. RFC #155. [breaking-change]
2014-09-08auto merge of #16952 : alexcrichton/rust/windows-large-console-write, r=brsonbors-1/+8
I've found that 64k is still too much and continue to see the errors as reported in #14940. I've locally found that 32k fails, and 24k succeeds, so I've trimmed the size down to 10000 which the included links in the added comment end up recommending. It sounds like the limit can still be hit with many threads in play, but I have yet to reproduce this, so I figure we can wait until that's hit (if it's possible) and then take action.
2014-09-08std: Turn down the stdout chunk sizeAlex Crichton-1/+8
I've found that 64k is still too much and continue to see the errors as reported in #14940. I've locally found that 32k fails, and 24k succeeds, so I've trimmed the size down to 8192 which libuv happens to use as well. It sounds like the limit can still be hit with many threads in play, but I have yet to reproduce this, so I figure we can wait until that's hit (if it's possible) and then take action.
2014-09-07Register snapshots.Huon Wilson-16/+0
Closes #16880.
2014-09-06auto merge of #16907 : SimonSapin/rust/tempdir-result, r=huonwbors-9/+13
This allows using `try!()` [breaking-change] Fixes #16875
2014-09-05auto merge of #16628 : pczarn/rust/hashmap-opt, r=nikomatsakisbors-3105/+3774
This is #15720, rebased and reopened. cc @nikomatsakis
2014-09-05auto merge of #16843 : bkoropoff/rust/reader-writer-box, r=alexcrichtonbors-0/+16
Cargo needs this to be able to instantiate `TerminfoTerminal<Box<Writer+'a>>` for 'a other than 'static.
2014-09-04std: Fix overflow of HashMap's capacityPiotr Czarnecki-32/+49
2014-09-04std: Refine and document HashMap's codePiotr Czarnecki-482/+704
* branchless `bucket.next()` * robin_hood is a free function * fixed the resize policy that was off by one * documented the growth algorithm * updated documentation after interface changes * removed old fixmes
2014-09-04auto merge of #16986 : bjz/rust/bitflags, r=alexcrichtonbors-117/+136
Closes #16469
2014-09-04auto merge of #16982 : jbcrail/rust/comment-and-string-corrections, ↵bors-7/+7
r=alexcrichton I corrected spelling and capitalization errors in comments and strings.
2014-09-05Use {} for bitflags! definition and invocationsBrendan Zabarauskas-27/+27
This looks nicer because it reflects Rust's other syntactic structures.
2014-09-05Attach documentation to the bitflags! macro itselfBrendan Zabarauskas-97/+98
This is in consistent with the style demonstrated in the std::macros module.
2014-09-05Test attributesBrendan Zabarauskas-0/+8
2014-09-05Allow trailing commas in bitflags! macroBrendan Zabarauskas-4/+14
2014-09-04auto merge of #16923 : wickerwaka/rust/crate-as-fixup, r=alexcrichtonbors-4/+4
Changed occurances of: extern crate foo = "bar"; to: extern crate "bar" as foo; Added warning for old deprecated syntax
2014-09-04Center alignment for fmtwickerwaka-1/+2
Use '^' to specify center alignment in format strings. fmt!( "[{:^5s}]", "Hi" ) -> "[ Hi ]" fmt!( "[{:^5s}]", "H" ) -> "[ H ]" fmt!( "[{:^5d}]", 1i ) -> "[ 1 ]" fmt!( "[{:^5d}]", -1i ) -> "[ -1 ]" fmt!( "[{:^6d}]", 1i ) -> "[ 1 ]" fmt!( "[{:^6d}]", -1i ) -> "[ -1 ]" If the padding is odd then the padding on the right will be one character longer than the padding on the left. Tuples squashed
2014-09-04auto merge of #16976 : treeman/rust/issue-16943, r=kballardbors-2/+23
Closes #16943.