From: bors Date: Thu, 11 Jan 2018 12:22:54 +0000 (+0000) Subject: Auto merge of #47180 - varkor:range-iterator-overrides, r=alexcrichton X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=73ac5d6a80f26c692f1e084b72d69637d7de2c8c;p=rust.git Auto merge of #47180 - varkor:range-iterator-overrides, r=alexcrichton Add iterator method specialisations to Range* Add specialised implementations of `max` for `Range`, and `last`, `min` and `max` for `RangeInclusive`, all of which lead to significant advantages in the generated assembly on x86. Note that adding specialisations of `min` and `last` for `Range` led to no benefit, and adding `sum` for `Range` and `RangeInclusive` led to type inference issues (though this is possibly still worthwhile considering the performance gain). This addresses some of the concerns in #39975. --- 73ac5d6a80f26c692f1e084b72d69637d7de2c8c