rust/src/libcore/tests
Mazdak Farrokhzad c32735d03c
Rollup merge of #62459 - timvermeulen:result_sum_internal_iteration, r=scottmcm
Use internal iteration in the Sum and Product impls of Result and Option

This PR adds internal iteration to the `ResultShunt` iterator type underlying the `Sum` and `Product` impls of `Result`. I had to change `ResultShunt` to hold a mutable reference to an error instead, similar to `itertools::ProcessResults`, in order to be able to pass the `ResultShunt` itself by value (which is necessary for internal iteration).

`ResultShunt::process` can unfortunately no longer be an associated function because that would make it generic over the lifetime of the error reference, which wouldn't work, so I turned it into the free function `process_results`.

I removed the `OptionShunt` type and forwarded the `Sum` and `Product` impls of `Option` to their respective impls of `Result` instead, to avoid having to repeat the internal iteration logic.
2019-08-06 15:36:27 +02:00
..
fmt Rollup merge of #60458 - KodrAus:debug_map_entry, r=alexcrichton 2019-07-09 04:52:35 +02:00
hash review or fix remaining miri failures in libcore 2019-02-13 18:21:13 +01:00
num Miri: disable a slow test 2019-06-09 14:04:30 +02:00
alloc.rs Add const_unchecked_layout test to libcore/tests 2019-05-14 09:41:50 +02:00
any.rs Remove licenses 2018-12-25 21:08:33 -07:00
array.rs Remove licenses 2018-12-25 21:08:33 -07:00
ascii.rs Fix mismatching Kleene operators 2019-07-03 00:37:25 +02:00
atomic.rs Remove licenses 2018-12-25 21:08:33 -07:00
cell.rs Deny rust_2018_idioms in libcore tests 2019-04-20 18:44:29 +02:00
char.rs Remove copy paste error in char tests 2019-02-27 14:44:20 +01:00
clone.rs Remove licenses 2018-12-25 21:08:33 -07:00
cmp.rs Remove licenses 2018-12-25 21:08:33 -07:00
intrinsics.rs Remove licenses 2018-12-25 21:08:33 -07:00
iter.rs Rollup merge of #62459 - timvermeulen:result_sum_internal_iteration, r=scottmcm 2019-08-06 15:36:27 +02:00
lib.rs Remove lint annotations in specific crates that are already enforced by rustbuild 2019-07-28 18:46:24 +03:00
manually_drop.rs Remove licenses 2018-12-25 21:08:33 -07:00
mem.rs Remove licenses 2018-12-25 21:08:33 -07:00
nonzero.rs fixed tests again 2019-02-28 21:00:41 +01:00
ops.rs Import Bound in tests 2019-05-31 16:56:26 -05:00
option.rs renamed inner_deref feature's deref*() methods as_deref*() as per discussion https://github.com/rust-lang/rust/issues/50264 2019-07-18 15:17:30 +09:00
pattern.rs Fix mismatching Kleene operators 2019-07-03 00:37:25 +02:00
ptr.rs fix slice comparison 2019-08-05 15:30:08 +02:00
result.rs renamed inner_deref feature's deref*() methods as_deref*() as per discussion https://github.com/rust-lang/rust/issues/50264 2019-07-18 15:17:30 +09:00
slice.rs Rollup merge of #62074 - wizAmit:feature/mut_chunks_nth_back, r=scottmcm 2019-07-28 03:01:44 +02:00
str.rs Remove licenses 2018-12-25 21:08:33 -07:00
str_lossy.rs Remove licenses 2018-12-25 21:08:33 -07:00
time.rs we can now skip should_panic tests with the libtest harness 2019-03-10 17:47:42 +01:00
tuple.rs Refactor tuple comparison tests 2019-03-25 13:00:57 -04:00