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

Weird async/await error message around mutablility #51932

Closed
cramertj opened this issue Jun 30, 2018 · 1 comment
Closed

Weird async/await error message around mutablility #51932

cramertj opened this issue Jun 30, 2018 · 1 comment
Labels
A-async-await Area: Async & Await A-borrow-checker Area: The borrow checker A-diagnostics Area: Messages for errors, warnings, and lints AsyncAwait-Triaged Async-await issues that have been triaged during a working group meeting. C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@cramertj
Copy link
Member

Attempting to mutate an argument to an async fn that was not marked mut results in this error message:
cannot borrow immutable captured outer variable in an `FnOnce` closure `sender` as mutable

This is obviously subpar 😆

@cramertj cramertj self-assigned this Jun 30, 2018
@stokhos stokhos added A-diagnostics Area: Messages for errors, warnings, and lints A-borrow-checker Area: The borrow checker labels Jun 30, 2018
@JohnTitor JohnTitor added A-async-await Area: Async & Await C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 2, 2019
@nikomatsakis nikomatsakis added the AsyncAwait-Triaged Async-await issues that have been triaged during a working group meeting. label Oct 8, 2019
@rylev
Copy link
Member

rylev commented Jun 11, 2021

This no longer seems to be the case. Please feel free to open with an reproducible piece of code if it's still an issue. 😊

@rylev rylev closed this as completed Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-async-await Area: Async & Await A-borrow-checker Area: The borrow checker A-diagnostics Area: Messages for errors, warnings, and lints AsyncAwait-Triaged Async-await issues that have been triaged during a working group meeting. C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants