Skip to content

Bring back suggestion for splitting <- in a comparison #62632

Closed
@varkor

Description

@varkor
fn main() {
    if x<-1 {
    }
}

produces:

error: expected `{`, found `<-`

It would be nice if it produced a suggestion to split it up:

if x < -1 {

(This used to happen, but was broken in a previous change.)

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-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