Will GATs allow HKTs for non-associated generic parameters?

359 views Asked by At

When looking into Higher-kinded types (HKTs), Generic associated types (GATs) constantly pop up as "the solution". They allow you to express things like this (which I think is really cool):

trait Foo {
    type Bar<T>;

    fn process<T>(&mut self, ctx: Self::Bar<T>);
}

I'm really excited about GATs being close to landing, but from what I understand it only enables HKTs for traits that use associated types. Or is there a way to express something like this too? (And if not, is there a feature flag or working issue for it?)

trait Foo<for<T> Bar> {
    fn process<T>(&mut self, ctx: Self::Bar<T>);
}
0

There are 0 answers