about summary refs log tree commit diff
path: root/src/libcore
AgeCommit message (Collapse)AuthorLines
2016-10-20Make `Result`'s `unwrap_or_default` unstableDevon Hollowood-3/+6
2016-10-21Fix a few links in the docsOliver Middleton-11/+12
2016-10-21doc: a more simple description of Iterator::nthTshepang Lekhonkhobe-6/+2
2016-10-20Document TrustedLen’s contractUlrik Sverdrup-1/+13
2016-10-20Implement TrustedLen for more iteratorsUlrik Sverdrup-5/+43
2016-10-20Introduce iterator trait TrustedLenUlrik Sverdrup-1/+50
2016-10-19Add `unwrap_or_default` method to `Result`Devon Hollowood-0/+33
2016-10-19Rollup merge of #37240 - jethrogb:typeid_doc, r=sfacklerEduard-Mihai Burtescu-4/+2
Add stable example to TypeId The old example is still available at [Any::get_type_id](https://doc.rust-lang.org/std/any/trait.Any.html#examples)
2016-10-19Rollup merge of #37230 - bluss:zip-specialization-for-map, r=alexcrichtonEduard-Mihai Burtescu-1/+65
Expand .zip() specialization to .map() and .cloned() Implement .zip() specialization for Map and Cloned. The crucial thing for transparent specialization is that we want to preserve the potential side effects. The simplest example is that in this code snippet: `(0..6).map(f).zip((0..4).map(g)).count()` `f` will be called five times, and `g` four times. The last time for `f` is when the other iterator is at its end, so this element is unused. This side effect can be preserved without disturbing code generation for simple uses of `.map()`. The `Zip::next_back()` case is even more complicated, unfortunately.
2016-10-17Add stable example to TypeIdJethro Beekman-4/+2
2016-10-17Expand .zip() specialization to .map() and .cloned()Ulrik Sverdrup-1/+65
Implement .zip() specialization for Map and Cloned. The crucial thing for transparent specialization is that we want to preserve the potential side effects. The simplest example is that in this code snippet: `(0..6).map(f).zip((0..4).map(g)).count()` `f` will be called five times, and `g` four times. The last time for `f` is when the other iterator is at its end, so this element is unused. This side effect can be preserved without disturbing code generation for simple uses of `.map()`. The `Zip::next_back()` case is even more complicated, unfortunately.
2016-10-17Add ordering_chaining feature to libcore/lib.rsMarcin Fatyga-0/+1
2016-10-16Fix doctestsMarcin Fatyga-4/+4
2016-10-16Run rustfmt on libcore/prelude folderSrinivas Reddy Thatiparthy-14/+28
2016-10-16Run rustfmt on libcore/sync folderSrinivas Reddy Thatiparthy-56/+58
2016-10-14Rollup merge of #37123 - srinivasreddy:libcore_num, r=ericktJonathan Turner-54/+112
run rustfmt on libcore/num folder
2016-10-14Rollup merge of #36961 - GuillaumeGomez:hash_doc, r=frewsxcvJonathan Turner-15/+22
Add missing urls for hash modules r? @steveklabnik
2016-10-12run rustfmt on libcore/num folderSrinivas Reddy Thatiparthy-54/+112
2016-10-11remove erroneous semicolonsMatthew Piziak-6/+6
2016-10-12Review changesNick Cameron-1/+1
2016-10-12Deprecate `Reflect`Nick Cameron-4/+6
[tracking issue](https://github.com/rust-lang/rust/issues/27749)
2016-10-12Stabilise `?`Nick Cameron-1/+4
cc [`?` tracking issue](https://github.com/rust-lang/rust/issues/31436)
2016-10-10Fix commentsMarcin Fatyga-2/+2
2016-10-09Fix trailing whitespace.Marcin Fatyga-4/+4
2016-10-09use UFCS with Add::add and Sub::sub instead of unstable attributesMatthew Piziak-12/+6
2016-10-09Add or and or_else for ordering.Marcin Fatyga-0/+70
2016-10-08Add missing urls for hash modulesGuillaume Gomez-15/+22
2016-10-07rewrite checked_{div,rem} to no contain any reference to panicsJorge Aparicio-8/+6
even without optimizations
2016-10-04update sip.rs for new intrinsics and defaultsEric Roshan-Eisner-14/+9
2016-10-04Rollup merge of #36908 - GuillaumeGomez:default_doc, r=apasel422Manish Goregaokar-1/+1
fix typos r? @steveklabnik
2016-10-04Rollup merge of #36902 - ollie27:stab_impls, r=alexcrichtonManish Goregaokar-13/+17
std: Correct stability attributes for some implementations These are displayed by rustdoc so should be correct.
2016-10-03Auto merge of #36815 - alexcrichton:stabilize-1.13, r=aturonbors-35/+37
std: Stabilize and deprecate APIs for 1.13 This commit is intended to be backported to the 1.13 branch, and works with the following APIs: Stabilized * `i32::checked_abs` * `i32::wrapping_abs` * `i32::overflowing_abs` * `RefCell::try_borrow` * `RefCell::try_borrow_mut` Deprecated * `BinaryHeap::push_pop` * `BinaryHeap::replace` * `SipHash13` * `SipHash24` * `SipHasher` - use `DefaultHasher` instead in the `std::collections::hash_map` module Closes #28147 Closes #34767 Closes #35057 Closes #35070
2016-10-03std: Stabilize and deprecate APIs for 1.13Alex Crichton-35/+37
This commit is intended to be backported to the 1.13 branch, and works with the following APIs: Stabilized * `i32::checked_abs` * `i32::wrapping_abs` * `i32::overflowing_abs` * `RefCell::try_borrow` * `RefCell::try_borrow_mut` * `DefaultHasher` * `DefaultHasher::new` * `DefaultHasher::default` Deprecated * `BinaryHeap::push_pop` * `BinaryHeap::replace` * `SipHash13` * `SipHash24` * `SipHasher` - use `DefaultHasher` instead in the `std::collections::hash_map` module Closes #28147 Closes #34767 Closes #35057 Closes #35070
2016-10-02fix typosGuillaume Gomez-1/+1
2016-10-01std: Correct stability attributes for some implementationsOliver Middleton-13/+17
These are displayed by rustdoc so should be correct.
2016-10-01impl Debug for raw pointers to unsized dataAlex Burka-2/+2
2016-09-30Auto merge of #36864 - steveklabnik:rollup, r=steveklabnikbors-33/+40
Rollup of 13 pull requests - Successful merges: #36529, #36535, #36576, #36623, #36711, #36750, #36810, #36829, #36833, #36841, #36842, #36851, #36860 - Failed merges:
2016-09-30Rollup merge of #36810 - GuillaumeGomez:ops_doc, r=steveklabnikSteve Klabnik-15/+19
Add missing urls for ops module Part of #29365. r? @steveklabnik
2016-09-30Rollup merge of #36750 - GuillaumeGomez:cmp_doc, r=steveklabnikSteve Klabnik-3/+6
Add missing links on cmp module r? @steveklabnik
2016-09-30Rollup merge of #36535 - GuillaumeGomez:macro_url, r=steveklabnikSteve Klabnik-2/+2
Update to new macro url syntax r? @steveklabnik
2016-09-30Rollup merge of #36529 - bluss:index-doc, r=GuillaumeGomezSteve Klabnik-13/+13
Clarify Index/IndexMut trait docs Use examples and placeholder variable names with more meaning, to not make it so abstract.
2016-09-30Auto merge of #36823 - durka:discriminant_value, r=nagisabors-0/+82
add wrapper for discriminant_value, take 2 [This is #34785 reopened, since @bors apparently gave up on that thread.] add wrapper for discriminant_value intrinsic Implementation of [RFC 1696](https://github.com/rust-lang/rfcs/blob/master/text/1696-discriminant.md). Wraps the `discriminant_value` intrinsic under the name `std::mem::discriminant`. In order to avoid prematurely leaking information about the implementation of enums, the return value is an opaque type, generic over the enum type, which implements Copy, Clone, PartialEq, Eq, Hash, and Debug (notably not PartialOrd). There is currently no way to get the value out excepting printing the debug representation. The wrapper is safe and can be stabilized soon as per discussion in #24263. cc @aturon r? @nagisa
2016-09-30str: Fix documentation typoDavid Henningsson-1/+1
from_utf8 returns a Result, not an Option. Signed-off-by: David Henningsson <diwic@ubuntu.com>
2016-09-29Auto merge of #36377 - tormol:encode_utf, r=alexcrichtonbors-132/+56
Change encode_utf{8,16}() to write to a buffer and panic if it's too small cc #27784 Should the "A buffer that's too small" examples be removed and replaced by tests?
2016-09-29Add missing urls for ops moduleGuillaume Gomez-15/+19
2016-09-28Auto merge of #36818 - jonathandturner:rollup, r=jonathandturnerbors-9/+0
Rollup of 12 pull requests - Successful merges: #35286, #35892, #36460, #36704, #36741, #36760, #36787, #36789, #36794, #36803, #36811, #36813 - Failed merges:
2016-09-28Rollup merge of #36811 - brson:bootstrap, r=alexcrichtonJonathan Turner-9/+0
Update bootstrap compiler
2016-09-28Auto merge of #36395 - durka:rangeinclusive-no-esi, r=alexcrichtonbors-2/+9
remove ExactSizeIterator from RangeInclusive<{u,i}{32,size}> Fixes #36386. This is a [breaking-change] for nightly users of `#![feature(inclusive_range_syntax)]` and/or `#![feature(inclusive_range)]`.
2016-09-28Remove stage0 hacksBrian Anderson-9/+0
2016-09-28[breaking-change] std: change `encode_utf{8,16}()` to take a buffer and ↵tormol-132/+56
return a slice They panic if the buffer is too small.