Skip to content

fix: improve error messaging for unreachable loop return cases #119178

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

Conversation

yossydev
Copy link

Check to see if the pattern is single binding, and if so, display a better error message!

ref: #116572

@rustbot
Copy link
Collaborator

rustbot commented Dec 21, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @b-naber (or someone else) soon.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 21, 2023
@yossydev yossydev marked this pull request as ready for review December 21, 2023 08:39
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@yossydev yossydev force-pushed the fix/improve-loop-return-error-message branch from e282c43 to 3b99407 Compare December 21, 2023 10:16
@yossydev
Copy link
Author

yossydev commented Jan 2, 2024

@rustbot review

Copy link
Member

@fmease fmease left a comment

Choose a reason for hiding this comment

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

Could you please add a test for this in tests/ui?

@yossydev
Copy link
Author

Could you please add a test for this in tests/ui?

ok!

@fmease fmease added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 4, 2024
@fmease
Copy link
Member

fmease commented Feb 5, 2024

r? fmease

@rustbot rustbot assigned fmease and unassigned b-naber Feb 5, 2024
@Dylan-DPC
Copy link
Member

@yossydev any updates on adding the test? thanks

@yossydev
Copy link
Author

@Dylan-DPC

any updates on adding the test? thanks

We are currently making it! Is it possible to wait a little longer...?

@Dylan-DPC
Copy link
Member

@yossydev sure take your time, just wanted to check if you were still working on it or if there some issue that we can help resolve. Thanks

@fmease
Copy link
Member

fmease commented Apr 19, 2024

@yossydev I'd say enough time has passed, I'll close this PR due to inactivity.

Feel to free to open a new PR once you find the time to work on this again. You can also ping me if and before you'd like to push your changes to this PR since I think I need to reopen it for you (?).

Note that the next time around it would be great if you could add some sort of UI test as well as a short explainer how the changes relate to issue #116572 (if it works towards fixing it, if it fixes it completely, ...).

You can consult the rustc dev guide on writing UI tests and a lot of other things.

@fmease fmease closed this Apr 19, 2024
@fmease fmease added S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants