]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #69706 - cuviper:subslice-methods, r=Centril
authorMazdak Farrokhzad <twingoow@gmail.com>
Sat, 7 Mar 2020 07:15:29 +0000 (08:15 +0100)
committerGitHub <noreply@github.com>
Sat, 7 Mar 2020 07:15:29 +0000 (08:15 +0100)
Use subslice patterns in slice methods

For all of the methods that pick off the first or last element, we can
use subslice patterns to implement them directly, rather than relying on
deeper indexing function calls. At a minimum, this means the generated
code will rely less on inlining for performance, but in some cases it
also optimizes better.


Trivial merge