-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Terrible error message when trying to use borrowed self
in move
closure
#45634
Comments
self
in move
closureself
in move
closure
self
in move
closureself
in move
closure
This issue isn't limited to |
Triage: very little change:
Error should point at |
Ast output:
MIR output:
|
No change in the output. The compiler should suggest a signature of |
@estebank FWIW in the case this was originally minimized from, the solution was actually to call |
Closing in favor of the newer ticket, which will be closed by #106641. Looking at the code it now compiles (after applying some suggested changes), and the new suggestion will not help for closures being returned. |
The code:
Expected behavior: prints error that looks something like this:
Actual behavior: prints this error message:
The text was updated successfully, but these errors were encountered: