| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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)
|
|
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.
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
run rustfmt on libcore/num folder
|
|
Add missing urls for hash modules
r? @steveklabnik
|
|
|
|
|
|
|
|
[tracking issue](https://github.com/rust-lang/rust/issues/27749)
|
|
cc [`?` tracking issue](https://github.com/rust-lang/rust/issues/31436)
|
|
|
|
|
|
|
|
|
|
|
|
even without optimizations
|
|
|
|
fix typos
r? @steveklabnik
|
|
std: Correct stability attributes for some implementations
These are displayed by rustdoc so should be correct.
|
|
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
|
|
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
|
|
|
|
These are displayed by rustdoc so should be correct.
|
|
|
|
Rollup of 13 pull requests
- Successful merges: #36529, #36535, #36576, #36623, #36711, #36750, #36810, #36829, #36833, #36841, #36842, #36851, #36860
- Failed merges:
|
|
Add missing urls for ops module
Part of #29365.
r? @steveklabnik
|
|
Add missing links on cmp module
r? @steveklabnik
|
|
Update to new macro url syntax
r? @steveklabnik
|
|
Clarify Index/IndexMut trait docs
Use examples and placeholder variable names with more meaning, to not
make it so abstract.
|
|
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
|
|
from_utf8 returns a Result, not an Option.
Signed-off-by: David Henningsson <diwic@ubuntu.com>
|
|
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?
|
|
|
|
Rollup of 12 pull requests
- Successful merges: #35286, #35892, #36460, #36704, #36741, #36760, #36787, #36789, #36794, #36803, #36811, #36813
- Failed merges:
|
|
Update bootstrap compiler
|
|
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)]`.
|
|
|
|
return a slice
They panic if the buffer is too small.
|