Implementation of FnOnce is not general enough for Flatten
iterator of futures outliving an .await point
#98380
Labels
A-async-await
Area: Async & Await
A-lifetimes
Area: Lifetimes / regions
A-trait-system
Area: Trait system
AsyncAwait-Triaged
Async-await issues that have been triaged during a working group meeting.
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
WG-async
Working group: Async & await
I tried this code:
Playground link
I expected that the code should compile without errors.
However, it produces a compile error:
The bug doesn't reproduce if we remove the
Send
requirement or.flatten()
combinator 🤔.Meta
rustc -V
:The text was updated successfully, but these errors were encountered: