diff options
author | Scott McMurray <scottmcm@users.noreply.github.com> | 2023-03-29 00:04:14 -0700 |
---|---|---|
committer | Scott McMurray <scottmcm@users.noreply.github.com> | 2023-03-29 00:27:24 -0700 |
commit | 843c5e361e1b392f89f71ac26a951f8dfd84e43a (patch) | |
tree | 5106cd6b277eee2df25859b85fc1576721683ff8 /tests/rustdoc-js-std/parser-errors.js | |
parent | acd27bb5572553a4dc9a2d6f21d9a3a68ff8a233 (diff) | |
download | rust-843c5e361e1b392f89f71ac26a951f8dfd84e43a.tar.gz |
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