Skip to content

Adding a hint on iterator type errors #106728

Closed
@petar-dambovaliev

Description

@petar-dambovaliev

rust version: rustc 1.66.0 (69f9c33d7 2022-12-12)

error[E0277]: `{float}` is not an iterator
  --> tests/core.rs:44:14
   |
44 |     for i in 0.200 {
   |              ^^^^^ `{float}` is not an iterator

Do you think it would be useful to add a hint here?
Something in the lines of Did you mean for i 0..200 {

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler 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