mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
44c7a2dbff
An async closure may implement `FnMut`/`Fn` if it has no self-borrows
There's no reason that async closures may not implement `FnMut` or `Fn` if they don't actually borrow anything with the closure's env lifetime. Specifically, #123660 made it so that we don't always need to borrow captures from the closure's env.
See the doc comment on `should_reborrow_from_env_of_parent_coroutine_closure`:
|
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
messages.ftl |