reference icon indicating copy to clipboard operation
reference copied to clipboard

`GenericArgsBinding` doesn't account for GATs

Open lowr opened this issue 2 years ago • 3 comments

Currently, GenericArgsBinding is defined as follows (link):

GenericArgsBinding :
   IDENTIFIER = Type

This definition does not account for GATs. It should include optional generic arguments after the identifier.

lowr avatar Jul 11 '23 10:07 lowr

Is there a stable way to actually use that?

ehuss avatar Jul 11 '23 13:07 ehuss

The following code compiles on stable and Assoc<i32> = () part is an example of GenericArgsBinding with a generic argument if I'm not mistaken?

trait Trait {
    type Assoc<T>;
}

fn foo<T>(_: T)
where
    T: Trait<Assoc<i32> = ()>
{}

(playground)

lowr avatar Jul 11 '23 13:07 lowr

Yep, thanks!

ehuss avatar Jul 11 '23 14:07 ehuss