about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2015-11-04Auto merge of #29200 - tshepang:rustfmt-path, r=aturonbors-96/+165
2015-11-03libstd: implement PartialEq<Path> for PathBuf and Cow<Path>Kevin Butler-0/+48
2015-11-03libstd: implement From<&Path|PathBuf> for Cow<Path>Kevin Butler-0/+36
2015-11-03Auto merge of #29514 - apasel422:issue-26220, r=alexcrichtonbors-0/+14
Closes #26220. r? @alexcrichton
2015-11-02Auto merge of #29456 - alexcrichton:path-hash, r=aturonbors-3/+37
Almost all operations on Path are based on the components iterator in one form or another to handle equivalent paths. The `Hash` implementations, however, mistakenly just went straight to the underlying `OsStr`, causing these equivalent paths to not get merged together. This commit updates the `Hash` implementation to also be based on the iterator which should ensure that if two paths are equal they hash to the same thing. cc #29008, but doesn't close it
2015-11-02std: Base Hash for Path on its iteratorAlex Crichton-3/+37
Almost all operations on Path are based on the components iterator in one form or another to handle equivalent paths. The `Hash` implementations, however, mistakenly just went straight to the underlying `OsStr`, causing these equivalent paths to not get merged together. This commit updates the `Hash` implementation to also be based on the iterator which should ensure that if two paths are equal they hash to the same thing. cc #29008, but doesn't close it
2015-11-02Auto merge of #29510 - mneumann:dragonfly-guard-page, r=alexcrichtonbors-0/+4
Only tested on DragonFly.
2015-11-01Implement `IntoIterator` for `&{Path, PathBuf}`Andrew Paseltiner-0/+14
Closes #26220.
2015-11-01Use guard-pages also on DragonFly/FreeBSD.Michael Neumann-0/+4
Only tested on DragonFly.
2015-11-01Auto merge of #29177 - vadimcn:rtstuff, r=alexcrichtonbors-55/+87
Note: for now, this change only affects `-windows-gnu` builds. So why was this `libgcc` dylib dependency needed in the first place? The stack unwinder needs to know about locations of unwind tables of all the modules loaded in the current process. The easiest portable way of achieving this is to have each module register itself with the unwinder when loaded into the process. All modules compiled by GCC do this by calling the __register_frame_info() in their startup code (that's `crtbegin.o` and `crtend.o`, which are automatically linked into any gcc output). Another important piece is that there should be only one copy of the unwinder (and thus unwind tables registry) in the process. This pretty much means that the unwinder must be in a shared library (unless everything is statically linked). Now, Rust compiler tries very hard to make sure that any given Rust crate appears in the final output just once. So if we link the unwinder statically to one of Rust's crates, everything should be fine. Unfortunately, GCC startup objects are built under assumption that `libgcc` is the one true place for the unwind info registry, so I couldn't find any better way than to replace them. So out go `crtbegin`/`crtend`, in come `rsbegin`/`rsend`! A side benefit of this change is that rustc is now more in control of the command line that goes to the linker, so we could stop using `gcc` as the linker driver and just invoke `ld` directly.
2015-10-31Fix stage0 ICE caused by the old _Unwind_Resume override trickery.Vadim Chugunov-0/+2
2015-10-31Auto merge of #29487 - sfackler:current-exe-docs, r=steveklabnikbors-3/+3
The "optionally" stuff just makes things confusing. r? @steveklabnik
2015-10-30Tweak env docs a bitSteven Fackler-3/+3
The "optionally" stuff just makes things confusing.
2015-10-31Auto merge of #29484 - steveklabnik:gh29330, r=brsonbors-130/+145
These two commits do a few things: 1. reformat to 80 cols 2. use the reference-style links where appropriate for improved in-source readability 3. adds a few links, tweaks a couple of words, `3` -> `three`, stuff like that While the diff is big due to these edits, there's no significant content change. r? @brson
2015-10-30Some fixes to std index docsSteve Klabnik-9/+10
Part of https://github.com/rust-lang/rust/issues/29330 Needed because of https://github.com/rust-lang/rust/issues/29481 and https://github.com/rust-lang/rust/issues/29483
2015-10-30Clean up formatting on std main pageSteve Klabnik-130/+144
Part of #29330
2015-10-30don't use drop_in_place as an intrinsicAlexis Beingessner-1/+3
2015-10-30run rustfmt on std::pathTshepang Lekhonkhobe-96/+165
There was a bunch of manual fixes too... rustfmt isn't quite there yet
2015-10-29Auto merge of #29289 - DiamondLovesYou:pnacl-std-crates, r=alexcrichtonbors-299/+267
2015-10-28Port the standard crates to PNaCl/NaCl.Richard Diamond-299/+267
2015-10-27Auto merge of #29298 - tbu-:pr_doc_env_panic, r=alexcrichtonbors-0/+12
2015-10-26Auto merge of #29301 - reddraggone9:patch-1, r=alexcrichtonbors-1/+1
Added a single character to fix a typo in a doc comment.
2015-10-26Auto merge of #29299 - tbu-:pr_btreemap_example_dup, r=alexcrichtonbors-4/+4
2015-10-25Say that `std::env::{set_var, unset_var}` *may* panicTobias Bucher-4/+6
Previously the documentation suggested that the documentation about the panics are guarantees.
2015-10-25Auto merge of #29254 - alexcrichton:stabilize-1.5, r=brsonbors-19/+117
This commit stabilizes and deprecates library APIs whose FCP has closed in the last cycle, specifically: Stabilized APIs: * `fs::canonicalize` * `Path::{metadata, symlink_metadata, canonicalize, read_link, read_dir, exists, is_file, is_dir}` - all moved to inherent methods from the `PathExt` trait. * `Formatter::fill` * `Formatter::width` * `Formatter::precision` * `Formatter::sign_plus` * `Formatter::sign_minus` * `Formatter::alternate` * `Formatter::sign_aware_zero_pad` * `string::ParseError` * `Utf8Error::valid_up_to` * `Iterator::{cmp, partial_cmp, eq, ne, lt, le, gt, ge}` * `<[T]>::split_{first,last}{,_mut}` * `Condvar::wait_timeout` - note that `wait_timeout_ms` is not yet deprecated but will be once 1.5 is released. * `str::{R,}MatchIndices` * `str::{r,}match_indices` * `char::from_u32_unchecked` * `VecDeque::insert` * `VecDeque::shrink_to_fit` * `VecDeque::as_slices` * `VecDeque::as_mut_slices` * `VecDeque::swap_remove_front` - (renamed from `swap_front_remove`) * `VecDeque::swap_remove_back` - (renamed from `swap_back_remove`) * `Vec::resize` * `str::slice_mut_unchecked` * `FileTypeExt` * `FileTypeExt::{is_block_device, is_char_device, is_fifo, is_socket}` * `BinaryHeap::from` - `from_vec` deprecated in favor of this * `BinaryHeap::into_vec` - plus a `Into` impl * `BinaryHeap::into_sorted_vec` Deprecated APIs * `slice::ref_slice` * `slice::mut_ref_slice` * `iter::{range_inclusive, RangeInclusive}` * `std::dynamic_lib` Closes #27706 Closes #27725 cc #27726 (align not stabilized yet) Closes #27734 Closes #27737 Closes #27742 Closes #27743 Closes #27772 Closes #27774 Closes #27777 Closes #27781 cc #27788 (a few remaining methods though) Closes #27790 Closes #27793 Closes #27796 Closes #27810 cc #28147 (not all parts stabilized)
2015-10-25std: Stabilize library APIs for 1.5Alex Crichton-19/+117
This commit stabilizes and deprecates library APIs whose FCP has closed in the last cycle, specifically: Stabilized APIs: * `fs::canonicalize` * `Path::{metadata, symlink_metadata, canonicalize, read_link, read_dir, exists, is_file, is_dir}` - all moved to inherent methods from the `PathExt` trait. * `Formatter::fill` * `Formatter::width` * `Formatter::precision` * `Formatter::sign_plus` * `Formatter::sign_minus` * `Formatter::alternate` * `Formatter::sign_aware_zero_pad` * `string::ParseError` * `Utf8Error::valid_up_to` * `Iterator::{cmp, partial_cmp, eq, ne, lt, le, gt, ge}` * `<[T]>::split_{first,last}{,_mut}` * `Condvar::wait_timeout` - note that `wait_timeout_ms` is not yet deprecated but will be once 1.5 is released. * `str::{R,}MatchIndices` * `str::{r,}match_indices` * `char::from_u32_unchecked` * `VecDeque::insert` * `VecDeque::shrink_to_fit` * `VecDeque::as_slices` * `VecDeque::as_mut_slices` * `VecDeque::swap_remove_front` - (renamed from `swap_front_remove`) * `VecDeque::swap_remove_back` - (renamed from `swap_back_remove`) * `Vec::resize` * `str::slice_mut_unchecked` * `FileTypeExt` * `FileTypeExt::{is_block_device, is_char_device, is_fifo, is_socket}` * `BinaryHeap::from` - `from_vec` deprecated in favor of this * `BinaryHeap::into_vec` - plus a `Into` impl * `BinaryHeap::into_sorted_vec` Deprecated APIs * `slice::ref_slice` * `slice::mut_ref_slice` * `iter::{range_inclusive, RangeInclusive}` * `std::dynamic_lib` Closes #27706 Closes #27725 cc #27726 (align not stabilized yet) Closes #27734 Closes #27737 Closes #27742 Closes #27743 Closes #27772 Closes #27774 Closes #27777 Closes #27781 cc #27788 (a few remaining methods though) Closes #27790 Closes #27793 Closes #27796 Closes #27810 cc #28147 (not all parts stabilized)
2015-10-25Fix doc comment typoLee Jenkins-1/+1
Added a single character to fix a typo in a doc comment.
2015-10-25Document possible panics for `std::env::{set_var, unset_var}`Tobias Bucher-0/+10
2015-10-25Remove key duplication from `BTreeMap` example in `collections`Tobias Bucher-4/+4
2015-10-25Auto merge of #29256 - alexcrichton:less-flaky, r=brsonbors-1/+3
The new bots we have may conflict with one another on base ports, causing tests to fail. For example the linux-musl-64-opt and linux-64-opt bots are using the same base port right now, causing some spurious failures every now and then.
2015-10-24Auto merge of #29215 - fhahn:issue-28157-bad-semicolon, r=alexcrichtonbors-2/+2
PR for #28157. At the moment, `rustc` emits a warning when a bare semicolon is encountered (could also be a fail, but I think this is a backwards incompatible change). Also I am not sure where the best place for a test for that warning would be. Seems run-pass tests do not check warnings.
2015-10-24Remove bare semicolonsFlorian Hahn-2/+2
2015-10-23std: Add more entries to stdtest base_portAlex Crichton-1/+3
The new bots we have may conflict with one another on base ports, causing tests to fail. For example the linux-musl-64-opt and linux-64-opt bots are using the same base port right now, causing some spurious failures every now and then.
2015-10-23Drop `advapi32` and `shell32` from late_link_args.Vadim Chugunov-0/+1
2015-10-23Auto merge of #27894 - steveklabnik:gh26888, r=alexcrichtonbors-4/+62
{BTree,Hash}{Map,Set} will not update their key if it already exists, which can matter with more complex keys. This behavior is now documented. Fixes #26888
2015-10-22Document replacement behavior in some collectionsSteve Klabnik-4/+62
{BTree,Hash}{Map,Set} will not update their key if it already exists, which can matter with more complex keys. This behavior is now documented. Fixes #26888
2015-10-21Fix doc sample for CursorWesley Wiser-1/+1
Fixes #29219
2015-10-21Moar comments.Vadim Chugunov-26/+34
2015-10-20std: Implement FromStr for SocketAddrV{4,6}Alex Crichton-17/+59
This was already implemented for SocketAddr, so the other types are lacking it is just an oversight! Closes #29183
2015-10-20Auto merge of #29187 - steveklabnik:rollup, r=steveklabnikbors-1/+1
- Successful merges: #29158, #29162, #29175, #29176 - Failed merges:
2015-10-20Rollup merge of #29158 - arcnmx:process-test, r=alexcrichtonSteve Klabnik-1/+1
This test was mysteriously messed with as part of #28500 r? @alexcrichton
2015-10-20Auto merge of #29156 - arcnmx:net-tests, r=alexcrichtonbors-32/+21
Just some minor cleanup.
2015-10-20Auto merge of #29155 - retep998:read-no-dir, r=alexcrichtonbors-0/+9
Fixes #29150 r? @alexcrichton
2015-10-19Use `cfg_attr` for switching `link` attrs in libunwind.Vadim Chugunov-33/+17
2015-10-19Rollup merge of #29169 - apasel422:spell, r=steveklabnikSteve Klabnik-2/+2
r? @steveklabnik
2015-10-19Rollup merge of #29125 - iKevinY:std-io-doc-fixes, r=alexcrichtonSteve Klabnik-7/+7
Just a few minor spelling/grammar fixes.
2015-10-19Correct spelling in docsAndrew Paseltiner-2/+2
2015-10-19Auto merge of #28977 - arcnmx:cstring-into, r=alexcrichtonbors-2/+72
`OsString` has these sorts of conversions, while `CString` has been missing them. I'm iffy on `into_string` simply because the return type would be better off as `FromUtf8Error<CString>`, which of course isn't generic :cry: Also should a different/new feature gate be used?
2015-10-19Owned conversions for CStringarcnmx-2/+72
2015-10-19Add error kind handling for ERROR_PATH_NOT_FOUNDPeter Atashian-0/+9
Fixes #29150 Signed-off-by: Peter Atashian <retep998@gmail.com>