diff options
author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2023-03-29 14:07:31 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-29 14:07:31 +0530 |
commit | 14157561fb6ac5937deb1de37eb9cb6fb8cd802f (patch) | |
tree | 88c1f389db1c022878ed3ca50cfa6e396a0dd464 /tests/rustdoc-js-std/parser-errors.js | |
parent | 2a4455d141e651c0ff627998ea484a095ee8b493 (diff) | |
parent | 843c5e361e1b392f89f71ac26a951f8dfd84e43a (diff) | |
download | rust-14157561fb6ac5937deb1de37eb9cb6fb8cd802f.tar.gz |
Rollup merge of #109718 - scottmcm:indexvec-last, r=Nilstrieb
Rename `IndexVec::last` → `last_index`
As I've been trying to replace a `Vec` with an `IndexVec`, having `last` exist on both but returning very different types makes the transition a bit awkward -- the errors are later, where you get things like "there's no `ty` method on `mir::Field`" rather than a more localized error like "hey, there's no `last` on `IndexVec`".
So I propose renaming `last` to `last_index` to help distinguish `Vec::last`, which returns an element, and `IndexVec::last_index`, which returns an index.
(Similarly, `Iterator::last` also returns an element, not an index.)
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions