Investigate getting rid of the AsyncFn*
family of traits in favor of LendingFn*
#120694
Labels
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
F-async_closure
`#![feature(async_closure)]`
T-types
Relevant to the types team, which will review and decide on the PR/issue.
This will allow us to avoid annoying trait duplication if we want to add
gen ||
andasync gen ||
closures.We need to lower
impl async Fn()
bounds toLendingFn
bounds using theassociated_type_bounds
feature. This doesn't work currently until:associated_type_bounds
feature #120584 fixes associated type bounds in some positionsFn
/FnMut
, or just have two new traits, i.e. figure out how to unify the fact thatLendingFnMut
doesn't necessarily haveFnOnce
as a supertrait.The text was updated successfully, but these errors were encountered: