Collect generic arguments in associated type bindings

This commit is contained in:
Ryo Yoshida 2022-10-26 22:52:04 +09:00
parent f233ac447f
commit 63cba43b48
No known key found for this signature in database
GPG key ID: E25698A930586171
5 changed files with 44 additions and 31 deletions

View file

@ -68,6 +68,9 @@ pub struct GenericArgs {
pub struct AssociatedTypeBinding {
/// The name of the associated type.
pub name: Name,
/// The generic arguments to the associated type. e.g. For `Trait<Assoc<'a, T> = &'a T>`, this
/// would be `['a, T]`.
pub args: Option<Interned<GenericArgs>>,
/// The type bound to this associated type (in `Item = T`, this would be the
/// `T`). This can be `None` if there are bounds instead.
pub type_ref: Option<TypeRef>,