about summary refs log tree commit diff
path: root/src/libcore
AgeCommit message (Collapse)AuthorLines
2016-04-17Auto merge of #33016 - tbu-:pr_doc_peekable, r=alexcrichtonbors-2/+7
Add a note about side effects for "peekable" iterators
2016-04-17Rollup merge of #33023 - tbu-:pr_wrapping_traits, r=alexcrichtonManish Goregaokar-1/+15
Implement `Display` and `Hash` for `std::num::Wrapping` Also, change the `Debug` implementation to only show the inner value. Fixes #33006.
2016-04-17Rollup merge of #32956 - GuillaumeGomez:ptr_examples, r=steveklabnikManish Goregaokar-0/+52
Add examples for std::ptr module functions Part of #29371. r? @steveklabnik
2016-04-16Auto merge of #32909 - sanxiyn:unused-trait-import-2, r=alexcrichtonbors-6/+3
Remove unused trait imports
2016-04-16Auto merge of #33019 - kamalmarhubi:binary_search_by_key, r=alexcrichtonbors-1/+1
slice: Add tracking issue for slice_binary_search_by_key
2016-04-16Implement `Display` and `Hash` for `std::num::Wrapping`Tobias Bucher-1/+15
Also, change the `Debug` implementation to only show the inner value. Fixes #33006.
2016-04-15Auto merge of #32785 - tbu-:pr_more_defaults, r=alexcrichtonbors-2/+9
Implement `Default` for more types in the standard library Also add `Hash` to `std::cmp::Ordering` and most possible traits to `fmt::Error`.
2016-04-15slice: Add tracking issue for slice_binary_search_by_keyKamal Marhubi-1/+1
2016-04-16Add a note about side effects for "peekable" iteratorsTobias Bucher-2/+7
2016-04-15Implement `Default` for more types in the standard libraryTobias Bucher-2/+9
Also add `Hash` to `std::cmp::Ordering` and most possible traits to `fmt::Error`.
2016-04-14Auto merge of #32693 - kamalmarhubi:binary_search_by_key, r=alexcrichtonbors-0/+13
collections: Add slice::binary_search_by_key This method adds to the family of `_by_key` methods, and is the counterpart of `slice::sort_by_key`. It was mentioned on #30423 but was not implemented at that time. Refs #30423
2016-04-14Rollup merge of #32893 - khernyo:clarify-try-doc, r=steveklabnikSteve Klabnik-1/+1
Clarify try! doc example The original is correct, but a bit misleading. r? @steveklabnik
2016-04-14Add examples for std::ptr module functionsggomez-0/+52
2016-04-13Add a note about overflowing in the `RangeFrom` iteratorTobias Bucher-0/+5
2016-04-12collections: Add slice::binary_search_by_keyKamal Marhubi-0/+13
This method adds to the family of `_by_key` methods, and is the counterpart of `slice::sort_by_key`. It was mentioned on #30423 but was not implemented at that time. Refs #30423
2016-04-12Remove unused trait importsSeo Sanghyeon-6/+3
2016-04-12Auto merge of #32804 - alexcrichton:stabilize-1.9, r=brsonbors-51/+84
std: Stabilize APIs for the 1.9 release This commit applies all stabilizations, renamings, and deprecations that the library team has decided on for the upcoming 1.9 release. All tracking issues have gone through a cycle-long "final comment period" and the specific APIs stabilized/deprecated are: Stable * `std::panic` * `std::panic::catch_unwind` (renamed from `recover`) * `std::panic::resume_unwind` (renamed from `propagate`) * `std::panic::AssertUnwindSafe` (renamed from `AssertRecoverSafe`) * `std::panic::UnwindSafe` (renamed from `RecoverSafe`) * `str::is_char_boundary` * `<*const T>::as_ref` * `<*mut T>::as_ref` * `<*mut T>::as_mut` * `AsciiExt::make_ascii_uppercase` * `AsciiExt::make_ascii_lowercase` * `char::decode_utf16` * `char::DecodeUtf16` * `char::DecodeUtf16Error` * `char::DecodeUtf16Error::unpaired_surrogate` * `BTreeSet::take` * `BTreeSet::replace` * `BTreeSet::get` * `HashSet::take` * `HashSet::replace` * `HashSet::get` * `OsString::with_capacity` * `OsString::clear` * `OsString::capacity` * `OsString::reserve` * `OsString::reserve_exact` * `OsStr::is_empty` * `OsStr::len` * `std::os::unix::thread` * `RawPthread` * `JoinHandleExt` * `JoinHandleExt::as_pthread_t` * `JoinHandleExt::into_pthread_t` * `HashSet::hasher` * `HashMap::hasher` * `CommandExt::exec` * `File::try_clone` * `SocketAddr::set_ip` * `SocketAddr::set_port` * `SocketAddrV4::set_ip` * `SocketAddrV4::set_port` * `SocketAddrV6::set_ip` * `SocketAddrV6::set_port` * `SocketAddrV6::set_flowinfo` * `SocketAddrV6::set_scope_id` * `<[T]>::copy_from_slice` * `ptr::read_volatile` * `ptr::write_volatile` * The `#[deprecated]` attribute * `OpenOptions::create_new` Deprecated * `std::raw::Slice` - use raw parts of `slice` module instead * `std::raw::Repr` - use raw parts of `slice` module instead * `str::char_range_at` - use slicing plus `chars()` plus `len_utf8` * `str::char_range_at_reverse` - use slicing plus `chars().rev()` plus `len_utf8` * `str::char_at` - use slicing plus `chars()` * `str::char_at_reverse` - use slicing plus `chars().rev()` * `str::slice_shift_char` - use `chars()` plus `Chars::as_str` * `CommandExt::session_leader` - use `before_exec` instead. Closes #27719 cc #27751 (deprecating the `Slice` bits) Closes #27754 Closes #27780 Closes #27809 Closes #27811 Closes #27830 Closes #28050 Closes #29453 Closes #29791 Closes #29935 Closes #30014 Closes #30752 Closes #31262 cc #31398 (still need to deal with `before_exec`) Closes #31405 Closes #31572 Closes #31755 Closes #31756
2016-04-12Clarify try! doc exampleSzabolcs Berecz-1/+1
The original is correct, but a bit misleading.
2016-04-11std: Stabilize APIs for the 1.9 releaseAlex Crichton-51/+84
This commit applies all stabilizations, renamings, and deprecations that the library team has decided on for the upcoming 1.9 release. All tracking issues have gone through a cycle-long "final comment period" and the specific APIs stabilized/deprecated are: Stable * `std::panic` * `std::panic::catch_unwind` (renamed from `recover`) * `std::panic::resume_unwind` (renamed from `propagate`) * `std::panic::AssertUnwindSafe` (renamed from `AssertRecoverSafe`) * `std::panic::UnwindSafe` (renamed from `RecoverSafe`) * `str::is_char_boundary` * `<*const T>::as_ref` * `<*mut T>::as_ref` * `<*mut T>::as_mut` * `AsciiExt::make_ascii_uppercase` * `AsciiExt::make_ascii_lowercase` * `char::decode_utf16` * `char::DecodeUtf16` * `char::DecodeUtf16Error` * `char::DecodeUtf16Error::unpaired_surrogate` * `BTreeSet::take` * `BTreeSet::replace` * `BTreeSet::get` * `HashSet::take` * `HashSet::replace` * `HashSet::get` * `OsString::with_capacity` * `OsString::clear` * `OsString::capacity` * `OsString::reserve` * `OsString::reserve_exact` * `OsStr::is_empty` * `OsStr::len` * `std::os::unix::thread` * `RawPthread` * `JoinHandleExt` * `JoinHandleExt::as_pthread_t` * `JoinHandleExt::into_pthread_t` * `HashSet::hasher` * `HashMap::hasher` * `CommandExt::exec` * `File::try_clone` * `SocketAddr::set_ip` * `SocketAddr::set_port` * `SocketAddrV4::set_ip` * `SocketAddrV4::set_port` * `SocketAddrV6::set_ip` * `SocketAddrV6::set_port` * `SocketAddrV6::set_flowinfo` * `SocketAddrV6::set_scope_id` * `<[T]>::copy_from_slice` * `ptr::read_volatile` * `ptr::write_volatile` * The `#[deprecated]` attribute * `OpenOptions::create_new` Deprecated * `std::raw::Slice` - use raw parts of `slice` module instead * `std::raw::Repr` - use raw parts of `slice` module instead * `str::char_range_at` - use slicing plus `chars()` plus `len_utf8` * `str::char_range_at_reverse` - use slicing plus `chars().rev()` plus `len_utf8` * `str::char_at` - use slicing plus `chars()` * `str::char_at_reverse` - use slicing plus `chars().rev()` * `str::slice_shift_char` - use `chars()` plus `Chars::as_str` * `CommandExt::session_leader` - use `before_exec` instead. Closes #27719 cc #27751 (deprecating the `Slice` bits) Closes #27754 Closes #27780 Closes #27809 Closes #27811 Closes #27830 Closes #28050 Closes #29453 Closes #29791 Closes #29935 Closes #30014 Closes #30752 Closes #31262 cc #31398 (still need to deal with `before_exec`) Closes #31405 Closes #31572 Closes #31755 Closes #31756
2016-04-11Rollup merge of #32873 - jethrogb:patch-2, r=steveklabnikSteve Klabnik-41/+53
Match signed/unsigned integer type docs * Copy documentation from signed implementation to unsigned implementation, where necessary. A few functions had elaborate docs in the signed version but not in the unsigned version. This probably happenned because the signed version is at the top and the author didn't realize they had to update the documentation in both locations. * Use signed integers in signed documentation, where possible. r? @steveklabnik
2016-04-11Rollup merge of #32862 - raphlinus:master, r=blussSteve Klabnik-1/+2
Bit-magic for faster is_char_boundary The asm generated for b < 128 || b >= 192 is not ideal, as it computes both sub-inequalities. This patch replaces it with bit magic. Fixes #32471
2016-04-11Rollup merge of #32854 - GuillaumeGomez:result_doc, r=steveklabnikSteve Klabnik-3/+44
Add some missing commas and missing titles/formatting Fixes #29373. r? @steveklabnik
2016-04-11Rollup merge of #32768 - GuillaumeGomez:slice_doc, r=steveklabnikSteve Klabnik-0/+81
Add doc examples for Iter and IterMut Fixes #29374. r? @steveklabnik
2016-04-10Match signed/unsigned integer type docsjethrogb-41/+53
* Copy documentation from signed implementation to unsigned implementation, where necessary. * Use signed integers in signed documentation, where possible.
2016-04-09Bit-magic for faster is_char_boundaryRaph Levien-1/+2
The asm generated for b < 128 || b >= 192 is not ideal, as it computes both sub-inequalities. This patch replaces it with bit magic. Fixes #32471
2016-04-09Add some missing commas and missing titles/formattingGuillaume Gomez-3/+44
2016-04-08Add doc example for Iter and IterMutGuillaume Gomez-4/+162
2016-04-07Rollup merge of #32741 - tbu-:pr_remove_fixme_12808, r=blussManish Goregaokar-39/+35
Remove strange names created by lack of privacy-conscious name lookup The fixed issue that allowed this was #12808.
2016-04-07Rollup merge of #32757 - taralx:patch-1, r=brsonManish Goregaokar-12/+12
Fix typos in atomic compare_exchange. Failure ordering can't be Release, not (not) Acquire. Seems like a typo copy-pasted all over.
2016-04-07Rollup merge of #32699 - bluss:slice-memcmp, r=alexcrichtonManish Goregaokar-38/+143
Specialize equality for [T] and comparison for [u8] to use memcmp when possible Specialize equality for [T] and comparison for [u8] to use memcmp when possible Where T is a type that can be compared for equality bytewise, we can use memcmp. We can also use memcmp for PartialOrd, Ord for [u8]. Use specialization to call memcmp in PartialEq for slices for certain element types. This PR does not change the user visible API since the implementation uses an intermediate trait. See commit messages for more information. The memcmp signature was changed from `*const i8` to `*const u8` which is in line with how the memcmp function is defined in C (taking const void * arguments, interpreting the values as unsigned bytes for purposes of the comparison).
2016-04-06slice: Use doc(hidden) on private traitsUlrik Sverdrup-0/+4
This should avoid the trait impls showing up in rustdoc.
2016-04-06avoid "==" in assert! when one of the values is a boolTshepang Lekhonkhobe-2/+2
2016-04-05Fix typos in atomic compare_exchange.JP Sugarbroad-12/+12
2016-04-05Specialize equality for [T] and comparison for [u8]Ulrik Sverdrup-38/+139
Where T is a type that can be compared for equality bytewise, we can use memcmp. We can also use memcmp for PartialOrd, Ord for [u8] and by extension &str. This is an improvement for example for the comparison [u8] == [u8] that used to emit a loop that compared the slices byte by byte. One worry here could be that this introduces function calls to memcmp in contexts where it should really inline the comparison or even optimize it out, but llvm takes care of recognizing memcmp specifically.
2016-04-05Remove strange names created by lack of privacy-conscious name lookupTobias Bucher-39/+35
The fixed issue that allowed this was #12808.
2016-04-03Auto merge of #32672 - ollie27:patch-5, r=alexcrichtonbors-2/+2
Fix a couple of dead links on core::num::ParseFloatError docs
2016-04-01Fix a couple of dead links on core::num::ParseFloatError docsOliver Middleton-2/+2
2016-04-02Rollup merge of #32652 - VFLashM:refcell_ref_coercion, r=alexcrichtonManish Goregaokar-2/+8
Added missing refcell ref/refmut coercions to unsized Ref/RefMut should be coercible to unsized. This commit adds a unit test and two missing CoerceUnsized implementations.
2016-04-01Rollup merge of #32642 - Amanieu:doc_fixes, r=apasel422Manish Goregaokar-1/+1
Fix formatting in the documentation for AtomicIsize::compare_exchange_weak
2016-03-31Auto merge of #32550 - tbu-:pr_ref_cell_as_unsafe_cell, r=alexcrichtonbors-6/+2
Remove `unsafe` qualifier from `RefCell::as_unsafe_cell` This method is no longer unsafe because the field of `UnsafeCell` is no longer public.
2016-03-31added missing refcell ref/refmut coercions to unsizedВалерий Лашманов-2/+8
2016-03-31Fix formatting in the documentation for AtomicIsize::compare_exchange_weakAmanieu d'Antras-1/+1
2016-03-30Rollup merge of #32580 - durka:patch-17, r=steveklabnikSteve Klabnik-10/+10
verb agreement in core::convert docs
2016-03-29verb agreement in core::convert docsAlex Burka-10/+10
2016-03-29Auto merge of #32564 - frewsxcv:patch-27, r=alexcrichtonbors-1/+1
Prefer HTTPS when linking to 131002.net.
2016-03-28Auto merge of #32438 - kamalmarhubi:intoiterator-example, r=steveklabnikbors-6/+6
style: Use `iter` for IntoIterator parameter names This commit standardizes the codebase on `iter` for parameters with IntoIterator bounds. Previously about 40% of IntoIterator parameters were named `iterable`, with most of the rest being named `iter`. There was a single place where it was named `iterator`.
2016-03-28Auto merge of #32461 - mitaa:rdoc-anchors, r=alexcrichtonbors-2/+2
rustdoc: Correct anchor for links to associated trait items fixes #28478 r? @alexcrichton
2016-03-28Prefer HTTPS when linking to 131002.net.Corey Farwell-1/+1
2016-03-28Add doc examples on pointer typesGuillaume Gomez-0/+85
2016-03-28style: Use `iter` for IntoIterator parameter namesKamal Marhubi-6/+6
This commit standardizes the codebase on `iter` for parameters with IntoIterator bounds. Previously about 40% of IntoIterator parameters were named `iterable`, with most of the rest being named `iter`. There was a single place where it was named `iterator`.