rust/src/libcore
Mazdak Farrokhzad ecc4e2a647
Rollup merge of #70896 - cuviper:optional-chain, r=scottmcm
Implement Chain with Option fuses

The iterators are now "fused" with `Option` so we don't need separate state to track which part is already exhausted, and we may also get niche layout for `None`. We don't use the real `Fuse` adapter because its specialization for `FusedIterator` unconditionally descends into the iterator, and that could be expensive to keep revisiting stuff like nested chains. It also hurts compiler performance to add more iterator layers to `Chain`.

This change was inspired by the [proposal](https://internals.rust-lang.org/t/proposal-implement-iter-chain-using-fuse/12006) on the internals forum. This is an alternate to #70332, directly employing some of the same `Fuse` optimizations as #70366 and #70750.

r? @scottmcm
2020-04-09 05:29:43 +02:00
..
alloc Update mod.rs 2020-04-03 08:22:31 +02:00
array fix internal lint fallout 2020-03-31 19:01:48 +02:00
benches Use assoc float consts in libcore 2020-04-06 22:44:51 +02:00
char Improve char::is_ascii_* code 2020-02-11 10:22:47 +01:00
convert Rollup merge of #70487 - Mark-Simulacrum:float-unchecked-casts, r=SimonSapin 2020-04-03 00:32:00 +02:00
fmt Replace max/min_value() with MAX/MIN assoc consts 2020-04-03 09:33:10 +02:00
future Add issue reference 2020-03-17 22:19:11 +01:00
hash Rollup merge of #69471 - nnethercote:rm-sip-Hasher-short_write, r=dtolnay 2020-03-15 02:44:15 +01:00
iter Avoid extra &mut in Chain::fold and try_fold 2020-04-07 16:58:52 -07:00
macros Expand on platform details of include_xxx macros 2020-04-02 16:34:43 +02:00
mem Auto merge of #69079 - CAD97:layout-of-ptr, r=RalfJung 2020-03-22 18:37:19 +00:00
num Make libcore float constant examples similar to libstd 2020-04-05 12:20:27 +02:00
ops Stop importing the float modules. Use assoc consts 2020-04-05 11:30:25 +02:00
prelude Rename asm! to llvm_asm! 2020-03-26 15:49:22 +00:00
ptr Replace max/min_value() with MAX/MIN assoc consts 2020-04-03 09:33:10 +02:00
slice Rollup merge of #70752 - yoshuawuyts:slice_fill, r=dtolnay 2020-04-05 06:44:45 +02:00
str Rollup merge of #70588 - Coder-256:str-split-at-docs, r=Dylan-DPC 2020-03-31 15:59:50 +02:00
sync Use copy bound in atomic operations to generate simpler MIR 2020-03-18 00:47:08 +01:00
task Use matches macro in libcore and libstd 2020-01-08 07:10:28 +03:00
tests Use integer assoc consts in libcore 2020-04-06 23:08:12 +02:00
unicode Remove separate encoding for a single nonzero-mapping byte 2020-03-27 19:02:23 -04:00
any.rs get rid of ConstPropUnsupported; use ZST marker structs instead 2020-03-22 12:16:24 +01:00
ascii.rs Format libcore with rustfmt 2019-11-26 23:02:11 -08:00
bool.rs Format libcore with rustfmt (including tests and benches) 2019-12-06 20:20:51 -08:00
borrow.rs Format the world 2019-12-22 17:42:47 -05:00
Cargo.toml Move the matches! macro to the prelude 2019-10-23 15:35:36 +02:00
cell.rs Rollup merge of #70029 - jonas-schievink:bootstrap, r=Centril 2020-03-17 03:05:17 +01:00
clone.rs Minor follow-up after renaming librustc(_middle) 2020-04-03 19:03:13 +09:00
cmp.rs Replace float module consts with assoc consts in documentation 2020-04-03 09:33:10 +02:00
default.rs Format libcore with rustfmt 2019-11-26 23:02:11 -08:00
ffi.rs Require issue = "none" over issue = "0" in unstable attributes 2019-12-21 13:16:18 +02:00
hint.rs Make documentation examples use new integer assoc consts 2020-04-03 09:33:10 +02:00
internal_macros.rs Require issue = "none" over issue = "0" in unstable attributes 2019-12-21 13:16:18 +02:00
intrinsics.rs Replace max/min_value() with MAX/MIN assoc consts 2020-04-03 09:33:10 +02:00
lib.rs Auto merge of #70370 - petrochenkov:nosmatch, r=Centril 2020-03-29 06:33:42 +00:00
marker.rs Minor follow-up after renaming librustc(_middle) 2020-04-03 19:03:13 +09:00
option.rs make "other" in docs of Option::{zip,zip_with} monofont 2020-03-19 22:19:37 +03:00
panic.rs Format the world 2019-12-22 17:42:47 -05:00
panicking.rs also make panic_fmt track_caller 2020-03-10 10:31:03 +01:00
pin.rs fix various typos 2020-03-06 15:19:31 +01:00
primitive.rs Bump core::primitive to 1.43 2020-02-23 23:59:39 -08:00
raw.rs Minor follow-up after renaming librustc(_middle) 2020-04-03 19:03:13 +09:00
result.rs docs: make the description of Result::map_or more clear 2020-04-04 14:18:02 +03:00
time.rs Make documentation examples use new integer assoc consts 2020-04-03 09:33:10 +02:00
tuple.rs Format libcore with rustfmt 2019-11-26 23:02:11 -08:00
unit.rs Format libcore with rustfmt 2019-11-26 23:02:11 -08:00