Suggest valid reverse for loop if an invalid variant is used #100635
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code: link
The current output is:
Ideally the compiler should check if the range's start >= end and inform the user that its an empty iterator.
Then for the above few incorrect variants (and possibly more), suggest the correct way to write a reverse for loop.
The text was updated successfully, but these errors were encountered: