diff options
Diffstat (limited to 'crates/ra_syntax/src/ast')
-rw-r--r-- | crates/ra_syntax/src/ast/generated.rs | 7 | ||||
-rw-r--r-- | crates/ra_syntax/src/ast/traits.rs | 6 |
2 files changed, 5 insertions, 8 deletions
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index 2b381dcdb..de506d7cd 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs | |||
@@ -3625,8 +3625,11 @@ impl AstNode for TypeParam { | |||
3625 | impl ast::NameOwner for TypeParam {} | 3625 | impl ast::NameOwner for TypeParam {} |
3626 | impl ast::AttrsOwner for TypeParam {} | 3626 | impl ast::AttrsOwner for TypeParam {} |
3627 | impl ast::TypeBoundsOwner for TypeParam {} | 3627 | impl ast::TypeBoundsOwner for TypeParam {} |
3628 | impl ast::DefaultTypeParamOwner for TypeParam {} | 3628 | impl TypeParam { |
3629 | impl TypeParam {} | 3629 | pub fn default_type(&self) -> Option<TypeRef> { |
3630 | AstChildren::new(&self.syntax).next() | ||
3631 | } | ||
3632 | } | ||
3630 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 3633 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
3631 | pub struct TypeParamList { | 3634 | pub struct TypeParamList { |
3632 | pub(crate) syntax: SyntaxNode, | 3635 | pub(crate) syntax: SyntaxNode, |
diff --git a/crates/ra_syntax/src/ast/traits.rs b/crates/ra_syntax/src/ast/traits.rs index c2b005886..f99984fe0 100644 --- a/crates/ra_syntax/src/ast/traits.rs +++ b/crates/ra_syntax/src/ast/traits.rs | |||
@@ -163,9 +163,3 @@ impl Iterator for CommentIter { | |||
163 | self.iter.by_ref().find_map(|el| el.into_token().and_then(ast::Comment::cast)) | 163 | self.iter.by_ref().find_map(|el| el.into_token().and_then(ast::Comment::cast)) |
164 | } | 164 | } |
165 | } | 165 | } |
166 | |||
167 | pub trait DefaultTypeParamOwner: AstNode { | ||
168 | fn default_type(&self) -> Option<ast::PathType> { | ||
169 | child_opt(self) | ||
170 | } | ||
171 | } | ||