Unnamed repository; edit this file 'description' to name the repository.
fix: temporarily use `ast::GenericParamList`
winstxnhdw 2024-07-25
parent 5af51fa · commit d42e857
-rw-r--r--crates/syntax/src/ast/node_ext.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/syntax/src/ast/node_ext.rs b/crates/syntax/src/ast/node_ext.rs
index 911e3d823d..16abb2984d 100644
--- a/crates/syntax/src/ast/node_ext.rs
+++ b/crates/syntax/src/ast/node_ext.rs
@@ -794,6 +794,8 @@ pub enum TypeBoundKind {
PathType(ast::PathType),
/// for<'a> ...
ForType(ast::ForType),
+ /// use
+ Use(ast::GenericParamList),
/// 'a
Lifetime(ast::Lifetime),
}
@@ -804,6 +806,8 @@ impl ast::TypeBound {
TypeBoundKind::PathType(path_type)
} else if let Some(for_type) = support::children(self.syntax()).next() {
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() {
TypeBoundKind::Lifetime(lifetime)
} else {