fix: temporarily use ast::GenericParamList

This commit is contained in:
winstxnhdw 2024-07-25 07:40:08 +01:00
parent 5af51fa476
commit d42e85758c

View file

@ -794,6 +794,8 @@ pub enum TypeBoundKind {
PathType(ast::PathType), PathType(ast::PathType),
/// for<'a> ... /// for<'a> ...
ForType(ast::ForType), ForType(ast::ForType),
/// use
Use(ast::GenericParamList),
/// 'a /// 'a
Lifetime(ast::Lifetime), Lifetime(ast::Lifetime),
} }
@ -804,6 +806,8 @@ impl ast::TypeBound {
TypeBoundKind::PathType(path_type) TypeBoundKind::PathType(path_type)
} else if let Some(for_type) = support::children(self.syntax()).next() { } else if let Some(for_type) = support::children(self.syntax()).next() {
TypeBoundKind::ForType(for_type) TypeBoundKind::ForType(for_type)
} else if let Some(generic_param_list) = self.generic_param_list() {
TypeBoundKind::Use(generic_param_list)
} else if let Some(lifetime) = self.lifetime() { } else if let Some(lifetime) = self.lifetime() {
TypeBoundKind::Lifetime(lifetime) TypeBoundKind::Lifetime(lifetime)
} else { } else {