-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
A-lintArea: New lintsArea: New lintsE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.Call for participation: Medium difficulty level problem and requires some initial experience.T-middleType: Probably requires verifiying typesType: Probably requires verifiying types
Description
It makes sense to lint the use of next_back
in cases where the iterator is not used beyond the call to next_back
, suggesting to replace last
instead. Additionally, implementations of Iterator::last
that only delegate to next_back
should be suggested to be removed.
This will likely need to be special cased to only do this for iterators which are known to optimise last
into next_back
through some sort of whitelist.
Metadata
Metadata
Assignees
Labels
A-lintArea: New lintsArea: New lintsE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.Call for participation: Medium difficulty level problem and requires some initial experience.T-middleType: Probably requires verifiying typesType: Probably requires verifiying types