rust/library/core/tests
bors 5fd3a5c7c1 Auto merge of #89916 - the8472:advance_by-avoid-err-0, r=dtolnay
Fix Iterator::advance_by contract inconsistency

The `advance_by(n)` docs state that in the error case `Err(k)` that k is always less than n.
It also states that `advance_by(0)` may return `Err(0)` to indicate an exhausted iterator.
These statements are inconsistent.
Since only one implementation (Skip) actually made use of that I changed it to return Ok(()) in that case too.

While adding some tests I also found a bug in `Take::advance_back_by`.
2021-11-27 11:31:26 +00:00
..
fmt Rollup merge of #86479 - exphp-forks:float-debug-exponential, r=yaahc 2021-10-20 04:35:10 +09:00
hash move object safety test to library/core 2021-08-15 13:00:25 -04:00
iter Fix Iterator::advance_by contract inconsistency 2021-11-19 13:00:23 +01:00
num Implement IEEE 754-2019 minimun and maximum functions for f32/f64 2021-11-20 10:14:03 +01:00
ops
alloc.rs
any.rs
array.rs Rollup merge of #90162 - WaffleLapkin:const_array_slice_from_ref_mut, r=oli-obk 2021-10-24 15:48:44 +02:00
ascii.rs Add #[must_use] to expensive computations 2021-10-12 23:27:17 -04:00
atomic.rs Make more From impls const 2021-10-18 19:19:28 +09:00
bool.rs
cell.rs Make more From impls const 2021-10-18 19:19:28 +09:00
char.rs Make more From impls const 2021-10-18 19:19:28 +09:00
clone.rs
cmp.rs
const_ptr.rs
intrinsics.rs
lazy.rs Make more From impls const 2021-10-18 19:19:28 +09:00
lib.rs Partially stabilize duration_consts_2 2021-11-22 13:09:08 -05:00
macros.rs Allow leading pipe in matches!() patterns. 2021-07-15 22:05:45 +03:00
manually_drop.rs
mem.rs
nonzero.rs Make From impls of NonZero integer const. 2021-10-20 12:04:58 +09:00
ops.rs
option.rs Make more From impls const 2021-10-18 19:19:28 +09:00
pattern.rs
pin.rs
ptr.rs
result.rs Make Result::as_mut const 2021-10-17 18:39:54 +09:00
simd.rs disable portable SIMD tests in Miri 2021-11-14 12:26:35 -05:00
slice.rs Fix Iterator::advance_by contract inconsistency 2021-11-19 13:00:23 +01:00
str.rs
str_lossy.rs
task.rs
time.rs Make Duration's Debug format pad to width 2021-09-16 03:09:31 +02:00
tuple.rs
unicode.rs