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

Bogus unrelated --explain text for "error[E0507]: cannot move out of captured outer variable in an Fn closure" #37904

Closed
insaneinside opened this issue Nov 20, 2016 · 1 comment · Fixed by #64330
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@insaneinside
Copy link
Contributor

rustc --explain E0507 prints a message which apparently discusses "error[E0507]: cannot move out of borrowed content":

You tried to move out of a value which was borrowed. ...

(That's funny, because the error said I tried to "move out of captured outer variable in an Fn closure".)

  • If "cannot move out of captured outer variable in an Fn closure" really is the same error, this should be explained in the --explain text.
  • If it is not the same error, it should have its own error code and explanation.
@insaneinside
Copy link
Contributor Author

insaneinside commented Nov 20, 2016

related: #37150, #31752

I understand how this is a borrow error, but IMHO it would be better for casual users if it had its own explanation because the diagnostic's message is so different.

@Mark-Simulacrum Mark-Simulacrum added the A-diagnostics Area: Messages for errors, warnings, and lints label May 16, 2017
@Mark-Simulacrum Mark-Simulacrum added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Jul 26, 2017
@bors bors closed this as completed in 35c24b4 Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants