We're working on making RPITITs be lowered as GAT. We have landed the work under -Zlower-impl-trait-in-trait-to-assoc-ty.
There's currently a pending issue because the generated GATs are not WF, copied lifetimes are not stated to be equal to the originating lifetime.
There are some alternatives on how we could lower the GAT, copy the lifetime or not, generated where bounds or not, have the GAT containing late-bound lifetimes, etc.
Let's discuss different alternatives and also https://github.com/rust-lang/rust/pull/103449 which avoids copying lifetimes.
Summary
We're working on making RPITITs be lowered as GAT. We have landed the work under
-Zlower-impl-trait-in-trait-to-assoc-ty
. There's currently a pending issue because the generated GATs are not WF, copied lifetimes are not stated to be equal to the originating lifetime. There are some alternatives on how we could lower the GAT, copy the lifetime or not, generated where bounds or not, have the GAT containing late-bound lifetimes, etc. Let's discuss different alternatives and also https://github.com/rust-lang/rust/pull/103449 which avoids copying lifetimes.Rationale