Skip to content
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

Improve error reporting for closure return type mismatches #87661

Merged
merged 1 commit into from
Aug 23, 2021

Conversation

FabianWolff
Copy link
Contributor

Fixes #87461.

@rust-highfive
Copy link
Collaborator

r? @wesleywiser

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 31, 2021
@JohnCSimon JohnCSimon added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 15, 2021
Copy link
Member

@wesleywiser wesleywiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks fine to me but I'm not sure about the interaction with existing diagnostics. Most of the changed UI tests seem like they have useful notes to me.

@wesleywiser
Copy link
Member

r? @estebank

I'm ok with merging this if the changes in diagnostics look good to you.

@FabianWolff
Copy link
Contributor Author

The code looks fine to me but I'm not sure about the interaction with existing diagnostics. Most of the changed UI tests seem like they have useful notes to me.

Yes, you are completely right @wesleywiser; I don't remember why I thought it would be OK for these notes to disappear. I have reworked my implementation so that it now works for all existing test cases.

@estebank
Copy link
Contributor

I don't know what the previous code looked like, but I'm ok with this.

@bors r+

@bors
Copy link
Contributor

bors commented Aug 23, 2021

📌 Commit d2fe289 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 Aug 23, 2021
@bors
Copy link
Contributor

bors commented Aug 23, 2021

⌛ Testing commit d2fe289 with merge 52c881f...

@bors
Copy link
Contributor

bors commented Aug 23, 2021

☀️ Test successful - checks-actions
Approved by: estebank
Pushing 52c881f to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 23, 2021
@bors bors merged commit 52c881f into rust-lang:master Aug 23, 2021
@rustbot rustbot added this to the 1.56.0 milestone Aug 23, 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.

return-type mismatch in async function gives "return type inferred" pointing to use of ?
7 participants