Skip to content

Docs suggest implemting try_fold on std::iter::iterator, which is not possible due to Try being unstable #69595

@mpdn

Description

@mpdn

std::iter::Iterator docs has this "Note to implementors" on try_fold:

Most of the other (forward) methods have default implementations in terms of this one, so try to implement this explicitly if it can do something better than the default for loop implementation.

But this isn't actually possible to do in stable due to the Try trait being unsable. The type bounds cannot be specified correctly to match the iterator definition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsA-iteratorsArea: IteratorsC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-help-wantedCall for participation: Help is requested to fix this issue.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