Skip to content

Termination of next for Range #1957

Description

@Lysxia

(Context: trying to prove termination of simple for loops.)

In theory, fixing this is as simple as adding an extern_spec. The difficulty is that the impl is polymorphic in the index type:

impl<A: Step> Iterator for Range<A> {
  fn next ...
}

So the termination of next depends on the termination of Step::forward_checked.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions