Async code causes error "implementation of FnOnce
is not general enough" when demanding an impl Send
#126551
Labels
A-async-await
Area: Async & Await
A-diagnostics
Area: Messages for errors, warnings, and lints
AsyncAwait-Triaged
Async-await issues that have been triaged during a working group meeting.
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Credit to @Ciel-MC for discovering this.
I tried this code:
I expected the code to compile without errors. Instead, I got the following compile error:
Possibly related to #126044
See also #126550, which has similar reproduction code.
Meta
Tested on the playground with stable (1.79.0) and nightly (1.81.0-nightly (2024-06-15 3cf924b))
The text was updated successfully, but these errors were encountered: