diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-06-20 08:36:00 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-20 08:36:00 +0200 |
| commit | 2e7e131b8e4ee2addf7f0ae64108a4da8210b369 (patch) | |
| tree | 8dcbda7e14fc1eaaef6a1593c9b4673405d9864e /src/test/ui/thinlto | |
| parent | 3e08f1b57ea6df87ee2d01f31339958998f8ea26 (diff) | |
| parent | 97a6c932e02fcd7f55fdad9aef76c5619f91f481 (diff) | |
| download | rust-2e7e131b8e4ee2addf7f0ae64108a4da8210b369.tar.gz rust-2e7e131b8e4ee2addf7f0ae64108a4da8210b369.zip | |
Rollup merge of #60772 - timvermeulen:slice_iter_nth_back, r=scottmcm
Implement nth_back for slice::{Iter, IterMut}
Part of #54054.
I implemented `nth_back` as straightforwardly as I could, and then slightly changed `nth` to match `nth_back`. I believe I did so correctly, but please double-check 🙂
I also added the helper methods `zst_shrink`, `next_unchecked`, and `next_back_unchecked` to get rid of some duplicated code. These changes hopefully make this code easier to understand for new contributors like me.
I noticed the `is_empty!` and `len!` macros which sole purpose seems to be inlining, according to the comment right above them, but the `is_empty` and `len` methods are already marked with `#[inline(always)]`. Does that mean we could replace these macros with method calls, without affecting anything? I'd love to get rid of them.
Diffstat (limited to 'src/test/ui/thinlto')
0 files changed, 0 insertions, 0 deletions
