Skip to content

Missing size_hint overrides in some Iterators implementations #23708

Closed
@SimonSapin

Description

@SimonSapin

Some implementations of Iterator don’t override the size_hint method (and keep the conservative (0, None) default), but should. This includes at least:

impl<A: Int> Iterator for StepBy<A, ::ops::Range<A>>
impl<A: Int> Iterator for ::ops::RangeFrom<A>
impl<A: Int> Iterator for RangeStepInclusive<A>

CC @alexcrichton

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.I-slowIssue: Problems and improvements with respect to performance of generated code.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions