Open
Description
This will allow us to avoid annoying trait duplication if we want to add gen ||
and async gen ||
closures.
We need to lower impl async Fn()
bounds to LendingFn
bounds using the associated_type_bounds
feature. This doesn't work currently until:
- For a rigid projection, recursively look at the self type's item bounds to fix the
associated_type_bounds
feature #120584 fixes associated type bounds in some positions - We fix hrtb + infer types break auto traits with return type notation #109924 (well, the general problem of HRTB with projections that have infer vars in them)
- Figure out if we want to add a new associated type to
Fn
/FnMut
, or just have two new traits, i.e. figure out how to unify the fact thatLendingFnMut
doesn't necessarily haveFnOnce
as a supertrait.