Skip to content

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

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
varkor opened this issue Jul 12, 2019 · 5 comments · Fixed by #63475
Closed

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

varkor opened this issue Jul 12, 2019 · 5 comments · Fixed by #63475
Assignees
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@varkor
Copy link
Member

varkor commented Jul 12, 2019

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.)

@varkor varkor added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. A-diagnostics Area: Messages for errors, warnings, and lints labels Jul 12, 2019
@agnxy
Copy link
Contributor

agnxy commented Jul 13, 2019

Hi @varkor I'd like to try this one. Just found the removed suggestion.

@agnxy
Copy link
Contributor

agnxy commented Jul 13, 2019

@rustbot claim

@JohnTitor

This comment has been minimized.

@jonas-schievink jonas-schievink added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 14, 2019
@iluuu1994
Copy link
Contributor

@agnxy It doesn't look like you're still working on this. Is it ok if I take over?

iluuu1994 added a commit to iluuu1994/rust that referenced this issue Aug 12, 2019
Centril added a commit to Centril/rust that referenced this issue Aug 12, 2019
Bring back suggestion for splitting `<-` into `< -`

Closes rust-lang#62632
@agnxy
Copy link
Contributor

agnxy commented Aug 12, 2019

@iluuu1994 Sure. Thanks for your help.

Centril added a commit to Centril/rust that referenced this issue Aug 13, 2019
Bring back suggestion for splitting `<-` into `< -`

Closes rust-lang#62632
Centril added a commit to Centril/rust that referenced this issue Aug 13, 2019
Bring back suggestion for splitting `<-` into `< -`

Closes rust-lang#62632
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue Aug 14, 2019
Bring back suggestion for splitting `<-` into `< -`

Closes rust-lang#62632
Centril added a commit to Centril/rust that referenced this issue Aug 14, 2019
Bring back suggestion for splitting `<-` into `< -`

Closes rust-lang#62632
Centril added a commit to Centril/rust that referenced this issue Aug 14, 2019
Bring back suggestion for splitting `<-` into `< -`

Closes rust-lang#62632
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants