async closure does not implement
FnMut
because it captures state from its environment
for async move
closures capturing copyable values, while closures returning async move
blocks work fine
#140403
Labels
A-async-closures
`async || {}`
C-bug
Category: This is a bug.
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
async move
closures do not implementFnMut
(and therefore also notFn
) when capturing a copyable value, but closures returning aasync move
block do.I tried this code:
Same with
Fn
Working code with
async move
blocks:Same with
Fn
Meta
rustc --version --verbose
:Backtrace
This issue may be linked to #125247.
The text was updated successfully, but these errors were encountered: