Skip to content

Add diagnostics for mistyped inclusive range #87071

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 18, 2021

Conversation

inquisitivecrystal
Copy link
Contributor

@inquisitivecrystal inquisitivecrystal commented Jul 12, 2021

Inclusive ranges are correctly typed as ..=. However, it's quite easy to think of it as being like ==, and type ..== instead. This PR adds helpful diagnostics for this case.

Resolves #86395 (there are some other cases there, but I think those should probably have separate issues).

r? @estebank

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 12, 2021
@estebank
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 18, 2021

📌 Commit b56079e has been approved by estebank

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 18, 2021
@bors
Copy link
Collaborator

bors commented Jul 18, 2021

⌛ Testing commit b56079e with merge 3ab6b60...

@bors
Copy link
Collaborator

bors commented Jul 18, 2021

☀️ Test successful - checks-actions
Approved by: estebank
Pushing 3ab6b60 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 18, 2021
@bors bors merged commit 3ab6b60 into rust-lang:master Jul 18, 2021
@rustbot rustbot added this to the 1.55.0 milestone Jul 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Opportunity to improve error message for mistyped inclusive range (..==)
5 participants