about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2015-10-31std: Prevent print panics when using TLSAlex Crichton-8/+26
Currently if a print happens while a thread is being torn down it may cause a panic if the LOCAL_STDOUT TLS slot has been destroyed by that point. This adds a guard to check and prints to the process stdout if that's the case (as we do for if the slot is already borrowed). Closes #29488
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-26std: Slightly more robust env var handlingAlex Crichton-56/+62
As discovered in #29298, `env::set_var("", "")` will panic, but it turns out that it *also* deadlocks on Unix systems. This happens because if a panic happens while holding the environment lock, we then go try to read RUST_BACKTRACE, grabbing the environment lock, causing a deadlock. Specifically, the changes made here are: * The environment lock is pushed into `std::sys` instead of `std::env`. This also only puts it in the Unix implementation, not Windows where the functions are already threadsafe. * The `std::sys` implementation now returns `io::Result` so panics are explicitly at the `std::env` level. The panic messages have also been improved in these situations.
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>
2015-10-19Add missing #[test] attribute to testarcnmx-1/+1
2015-10-19Touch up net testsarcnmx-32/+21
2015-10-18Create entry points for unwind frame registry in libstd.Vadim Chugunov-0/+34
2015-10-18Implement `eh_unwind_resume` in libstd.Vadim Chugunov-9/+12
2015-10-18Clean up thread::spawnarcnmx-23/+16
2015-10-17Remove some trivial `transmute`sAndrew Paseltiner-2/+1
`rbml::writer::Encoder::unsafe_clone` had no users across the entire repo.
2015-10-17Fix minor issues with std::io docsKevin Yap-7/+7
2015-10-16Add `Shared` pointer and have `{Arc, Rc}` use itAndrew Paseltiner-0/+2
This change has two consequences: 1. It makes `Arc<T>` and `Rc<T>` covariant in `T`. 2. It causes the compiler to reject code that was unsound with respect to dropck. See compile-fail/issue-29106.rs for an example of code that no longer compiles. Because of this, this is a [breaking-change]. Fixes #29037. Fixes #29106.
2015-10-15Auto merge of #29031 - cristicbz:mtx_inner, r=alexcrichtonbors-0/+233
The implementation for `into_inner` was a bit more complex than I had hoped for---is there any simpler, less unsafe way of getting around the fact that one can't move out of a `Drop` struct? See #28968 and rust-lang/rfcs#1269 .