Skip to content

Some errors could be better handled by detecting a pattern #101291

Closed
@Canop

Description

@Canop

Exemple Use Case:

It's possibly common enough for people using several languages to apply the wrong, easy to recognize, construct.

Recognizing this construct in case an error is detected would avoid a sequence of suboptimal hints.

Here's the exemple of typing for let thing of some_iterator (JavaScript inspired):

image

A more relevant hint would suggest the typical Rust iteration.

Triage note:

@estebank suggested I create an issue here

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