-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Mistaken "dropped here while still borrowed" with impl trait + match #52706
Comments
Curious, needs some more investigation. |
assigning to self for preliminary investigation. |
(removing NLL label since the bug is stated as occurring with and without NLL.) |
You don't need that specific statement, even just adding a semicolon fixes it. |
Discussed at meeting. This is similar to a number of other cases I was looking at today (namely #53528 and #53450), in that In our current implementation of the rvalue-lifetime and drop-check rules in particular #21114 and #46413, you can end up in scenarios where the last expression in a block needs to have a semi-colon added to it, or you get borrow-check errors. It would be good for us to address those cases, potentially as part of longer term NLL work, but its not something we're treating as a high priority item in the short term. Therefore, I'm closing this bug as a duplicate of #21114 |
This manifests identically on stable and nightly without and with nll.
(Playground)
Errors:
The text was updated successfully, but these errors were encountered: